From 0fec26b00be202f828193a66ed35c842389588f4 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 28 Oct 2009 11:11:18 -0700 Subject: [PATCH] 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. --- lib/util.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/util.c b/lib/util.c index c9ef8b15..6c152e24 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; -- 2.30.2