projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2cc9064
)
util: Make ovs_fatal() understand EOF also.
author
Ben Pfaff
<blp@nicira.com>
Thu, 12 Aug 2010 18:05:07 +0000
(11:05 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Thu, 12 Aug 2010 22:45:50 +0000
(15:45 -0700)
ovs_error() interprets EOF as "end of file" when printing an error message,
so ovs_fatal() might as well.
lib/util.c
patch
|
blob
|
history
diff --git
a/lib/util.c
b/lib/util.c
index 9fc99f07d37b55495eb5389adc7e2dfd81beb820..01ebc9c661f20067c1d5a8fc95fcba7bce8dfbc2 100644
(file)
--- 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);