mirror of
https://github.com/openvswitch/ovs
synced 2025-09-01 06:45:17 +00:00
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.
This commit is contained in:
@@ -156,7 +156,8 @@ ovs_fatal(int err_no, const char *format, ...)
|
|||||||
vfprintf(stderr, format, args);
|
vfprintf(stderr, format, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
if (err_no != 0)
|
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);
|
putc('\n', stderr);
|
||||||
|
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
Reference in New Issue
Block a user