summaryrefslogtreecommitdiff
path: root/lib/util.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2009-10-28 11:11:18 -0700
committerBen Pfaff <blp@nicira.com>2009-11-04 15:24:40 -0800
commit0fec26b00be202f828193a66ed35c842389588f4 (patch)
tree80400248a8fb79172b0b5bc23221deed3c49f0d4 /lib/util.c
parentd918d9d1128a98e4b2a398a501f541554fed3be8 (diff)
downloadopenvswitch-0fec26b00be202f828193a66ed35c842389588f4.tar.gz
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.
Diffstat (limited to 'lib/util.c')
-rw-r--r--lib/util.c6
1 files changed, 4 insertions, 2 deletions
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;