[ovs-dev] [PATCH 1/3] util: Make ovs_fatal() understand EOF also.

Justin Pettit jpettit at nicira.com
Thu Aug 12 21:03:20 UTC 2010


Looks good.

--Justin


On Aug 12, 2010, at 11:12 AM, Ben Pfaff wrote:

> ovs_error() interprets EOF as "end of file" when printing an error message,
> so ovs_fatal() might as well.
> ---
> lib/util.c |    3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/lib/util.c b/lib/util.c
> index 9fc99f0..01ebc9c 100644
> --- a/lib/util.c
> +++ b/lib/util.c
> @@ -156,7 +156,8 @@ ovs_fatal(int err_no, const char *format, ...)
>     vfprintf(stderr, format, args);
>     va_end(args);
>     if (err_no != 0)
> -        fprintf(stderr, " (%s)", strerror(err_no));
> +        fprintf(stderr, " (%s)",
> +                err_no == EOF ? "end of file" : strerror(err_no));
>     putc('\n', stderr);
> 
>     exit(EXIT_FAILURE);
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org





More information about the dev mailing list