Re: [PATCH] core: check the return status properly



I thought it's a typo in the beginning, but now I figured out that
avoid spamming
the log. Please ignore my patch.

在 2012年3月13日下午5:09,Gary Ching-Pang Lin <chingpang gmail com> 寫道:
> According to the manpage, we have to check WIFEXITED() before
> calling WEXITSTATUS().
> ---
>  src/nm-activation-request.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/nm-activation-request.c b/src/nm-activation-request.c
> index 3fc7b53..6ab25e4 100644
> --- a/src/nm-activation-request.c
> +++ b/src/nm-activation-request.c
> @@ -305,7 +305,7 @@ nm_act_request_set_shared (NMActRequest *req, gboolean shared)
>                                             error ? error->code : -1,
>                                             (error && error->message) ? error->message : "(unknown)");
>                                g_clear_error (&error);
> -                       } else if (WEXITSTATUS (status)) {
> +                       } else if (WIFEXITED (status)) {
>                                nm_log_warn (LOGD_SHARING, "** Command returned exit status %d.",
>                                             WEXITSTATUS (status));
>                        }
> --
> 1.7.7
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]