From e2c1a82010cc4f35cb576d41c3c2020010503784 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 12 Aug 2010 11:05:07 -0700 Subject: [PATCH] util: Make ovs_fatal() understand EOF also. ovs_error() interprets EOF as "end of file" when printing an error message, so ovs_fatal() might as well. --- lib/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/util.c b/lib/util.c index 9fc99f07d..01ebc9c66 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); -- 2.43.0