Message ID | 1390406089-14016-1-git-send-email-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
On 01/22/2014 11:54 PM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > fix inverted status check of exec calls. This is causing > uefi tests to fail because of module load/unload is > erroneously being reported to fail when it is in fact > succeeding. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/lib/src/fwts_pipeio.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/lib/src/fwts_pipeio.c b/src/lib/src/fwts_pipeio.c > index 1f21ed7..df07295 100644 > --- a/src/lib/src/fwts_pipeio.c > +++ b/src/lib/src/fwts_pipeio.c > @@ -179,7 +179,8 @@ int fwts_exec(const char *command, int *status) > if ((fd = fwts_pipe_open(command, &pid)) < 0) > return FWTS_ERROR; > > - if (!(*status = fwts_pipe_close(fd, pid))) > + *status = fwts_pipe_close(fd, pid); > + if (*status) > return FWTS_EXEC_ERROR; > return FWTS_OK; > } > Acked-by: Alex Hung <alex.hung@canonical.com>
On 01/22/2014 11:54 PM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > fix inverted status check of exec calls. This is causing > uefi tests to fail because of module load/unload is > erroneously being reported to fail when it is in fact > succeeding. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/lib/src/fwts_pipeio.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/lib/src/fwts_pipeio.c b/src/lib/src/fwts_pipeio.c > index 1f21ed7..df07295 100644 > --- a/src/lib/src/fwts_pipeio.c > +++ b/src/lib/src/fwts_pipeio.c > @@ -179,7 +179,8 @@ int fwts_exec(const char *command, int *status) > if ((fd = fwts_pipe_open(command, &pid)) < 0) > return FWTS_ERROR; > > - if (!(*status = fwts_pipe_close(fd, pid))) > + *status = fwts_pipe_close(fd, pid); > + if (*status) > return FWTS_EXEC_ERROR; > return FWTS_OK; > } > Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff --git a/src/lib/src/fwts_pipeio.c b/src/lib/src/fwts_pipeio.c index 1f21ed7..df07295 100644 --- a/src/lib/src/fwts_pipeio.c +++ b/src/lib/src/fwts_pipeio.c @@ -179,7 +179,8 @@ int fwts_exec(const char *command, int *status) if ((fd = fwts_pipe_open(command, &pid)) < 0) return FWTS_ERROR; - if (!(*status = fwts_pipe_close(fd, pid))) + *status = fwts_pipe_close(fd, pid); + if (*status) return FWTS_EXEC_ERROR; return FWTS_OK; }