Skip to content

Commit

Permalink
Revert "sysupgrade: print errno on failure"
Browse files Browse the repository at this point in the history
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 039b88f.

Signed-off-by: Stijn Tintel <[email protected]>
  • Loading branch information
stintel committed Mar 22, 2023
1 parent 190f13a commit 122a5e3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sysupgrade.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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(".");
Expand Down

0 comments on commit 122a5e3

Please sign in to comment.