Revert "sysupgrade: print errno on failure"
authorStijn Tintel <stijn@linux-ipv6.be>
Wed, 23 Nov 2022 15:20:43 +0000 (17:20 +0200)
committerStijn Tintel <stijn@linux-ipv6.be>
Wed, 22 Mar 2023 19:01:48 +0000 (21:01 +0200)
This commit was taken from one of my staging branches without my
knowledge. Testing exposed problems with strerror, and the commit
message was not updated to reflect the use of strerror either.

  Failed to exec upgraded: No error information

This reverts commit 039b88f75367203e540009cc97603b1bce3fafa6.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
sysupgrade.c

index 96a29e919e0db0458695774519f0508c2ef41bdc..fc588b0248353137d4b81fce130d2d35d8dfa710 100644 (file)
 #include "sysupgrade.h"
 
 #include <ctype.h>
-#include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
 #include <unistd.h>
 
 #include <libubox/blobmsg.h>
@@ -105,7 +103,7 @@ void sysupgrade_exec_upgraded(const char *prefix, char *path,
        execvp(argv[0], argv);
 
        /* Cleanup on failure */
-       fprintf(stderr, "Failed to exec upgraded: %s\n", strerror(-errno));
+       fprintf(stderr, "Failed to exec upgraded.\n");
        unsetenv("WDTFD");
        watchdog_set_cloexec(true);
        ret = chroot(".");