Browse Source

Revert "sysupgrade: print errno on failure"

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>
Stijn Tintel 1 year ago
parent
commit
122a5e3b84
1 changed files with 1 additions and 3 deletions
  1. 1 3
      sysupgrade.c

+ 1 - 3
sysupgrade.c

@@ -19,10 +19,8 @@
 #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(".");