ifstat: handle unlink return value
Subsystems (2)
PATCH v3 1/1 ifstat: handle unlink return value
Print an error message if we can't remove the history file
v2: exit if unlink failed
v3: restore the changelog
Signed-off-by Denis Kirjanov <[email protected]>
--- misc/ifstat.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
misc/ifstat.c +4 -2
@@ -937,8 +937,10 @@ int main(int argc, char *argv[])"%s/.%s_ifstat.u%d" , P_tmpdir, stats_type, getuid()); -if (reset_history) -unlink (hist_name); +if (reset_history &&unlink (hist_name) <0 ) { +perror ("ifstat: unlink history file" ); +exit (-1 ); + }if (!ignore_history || !no_update) {struct stat stb;
Signature · 1 line
2.30.2
This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:
Hello:
This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:
Quoted 8 lines · On Thu, 29 Feb 2024 07:26:34 -0500 you wrote:
Print an error message if we can't remove the history file
v2: exit if unlink failed
v3: restore the changelogSigned-off-by Denis Kirjanov <[email protected]>[...]
Here is the summary with links:
- [iproute2,v3] ifstat: handle unlink return value
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=67685422bfee
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html