Message ID | 20220422235944.2808227-3-dominique.martinet@atmark-techno.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/6] sigchld_handler: report child exit status correctly | expand |
On 23.04.22 01:59, Dominique Martinet wrote: > using the swupdate status from last update is not consistent with what other > modes (at least swupdate -i / swupdate-client) return, and might miss weird > conditions where result is IDLE for some reason that would be success (0 value) > > return EXIT_FAILURE like the others > Agree. > Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com> > --- > > This only makes sense if previous patch is applied, and doesn't matter > if it's not as that exit status is currently lost > > > corelib/downloader.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/corelib/downloader.c b/corelib/downloader.c > index 0debad0b7486..6bff9c7f2b82 100644 > --- a/corelib/downloader.c > +++ b/corelib/downloader.c > @@ -163,5 +163,5 @@ int start_download(const char *fname, int argc, char *argv[]) > free(channel_options.auth); > } > > - exit(result == SUCCESS ? EXIT_SUCCESS : result); > + exit(result == SUCCESS ? EXIT_SUCCESS : EXIT_FAILURE); > } Reviewed-by: Stefano babic <sbabic@denx.de> Best regards, Stefano Babic
On 23.04.22 01:59, Dominique Martinet wrote: > using the swupdate status from last update is not consistent with what other > modes (at least swupdate -i / swupdate-client) return, and might miss weird > conditions where result is IDLE for some reason that would be success (0 value) > > return EXIT_FAILURE like the others > > Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com> > --- > > This only makes sense if previous patch is applied, and doesn't matter > if it's not as that exit status is currently lost > > > corelib/downloader.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/corelib/downloader.c b/corelib/downloader.c > index 0debad0b7486..6bff9c7f2b82 100644 > --- a/corelib/downloader.c > +++ b/corelib/downloader.c > @@ -163,5 +163,5 @@ int start_download(const char *fname, int argc, char *argv[]) > free(channel_options.auth); > } > > - exit(result == SUCCESS ? EXIT_SUCCESS : result); > + exit(result == SUCCESS ? EXIT_SUCCESS : EXIT_FAILURE); > } Applied to -master, thanks ! Best regards, Stefano Babic
diff --git a/corelib/downloader.c b/corelib/downloader.c index 0debad0b7486..6bff9c7f2b82 100644 --- a/corelib/downloader.c +++ b/corelib/downloader.c @@ -163,5 +163,5 @@ int start_download(const char *fname, int argc, char *argv[]) free(channel_options.auth); } - exit(result == SUCCESS ? EXIT_SUCCESS : result); + exit(result == SUCCESS ? EXIT_SUCCESS : EXIT_FAILURE); }
using the swupdate status from last update is not consistent with what other modes (at least swupdate -i / swupdate-client) return, and might miss weird conditions where result is IDLE for some reason that would be success (0 value) return EXIT_FAILURE like the others Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com> --- This only makes sense if previous patch is applied, and doesn't matter if it's not as that exit status is currently lost corelib/downloader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)