From: Ben Pfaff Date: Wed, 28 Oct 2009 18:11:18 +0000 (-0700) Subject: util: Make ovs_error() understand that EOF means "end of file". X-Git-Tag: v1.0.0~259^2~530 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=0fec26b00be202f828193a66ed35c842389588f4;p=sliver-openvswitch.git util: Make ovs_error() understand that EOF means "end of file". This convention is in use in a few places in the source tree, and so it seems to be about time to start putting it into central places. --- diff --git a/lib/util.c b/lib/util.c index c9ef8b159..6c152e24d 100644 --- a/lib/util.c +++ b/lib/util.c @@ -168,8 +168,10 @@ ovs_error(int err_no, const char *format, ...) va_start(args, format); vfprintf(stderr, format, args); va_end(args); - if (err_no != 0) - fprintf(stderr, " (%s)", strerror(err_no)); + if (err_no != 0) { + fprintf(stderr, " (%s)", + err_no == EOF ? "end of file" : strerror(err_no)); + } putc('\n', stderr); errno = save_errno;