diff options
author | Karel Zak | 2016-08-16 13:35:06 +0200 |
---|---|---|
committer | Karel Zak | 2016-08-16 13:35:06 +0200 |
commit | 090d8c763a50b5b0c83f423a2e943fa928b29d56 (patch) | |
tree | caec6fc5369d9f6427e3b3c1b2bc6c2c703ce511 /include/closestream.h | |
parent | include/env: minor fixes and clean ups (diff) | |
download | kernel-qcow2-util-linux-090d8c763a50b5b0c83f423a2e943fa928b29d56.tar.gz kernel-qcow2-util-linux-090d8c763a50b5b0c83f423a2e943fa928b29d56.tar.xz kernel-qcow2-util-linux-090d8c763a50b5b0c83f423a2e943fa928b29d56.zip |
include/closestream: define exit codes
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include/closestream.h')
-rw-r--r-- | include/closestream.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/closestream.h b/include/closestream.h index 7842456fb..2dfe11360 100644 --- a/include/closestream.h +++ b/include/closestream.h @@ -10,6 +10,10 @@ #include "c.h" #include "nls.h" +#ifndef CLOSE_EXIT_CODE +# define CLOSE_EXIT_CODE EXIT_FAILURE +#endif + #ifndef HAVE___FPENDING static inline int __fpending(FILE *stream __attribute__((__unused__))) @@ -42,11 +46,11 @@ close_stdout(void) warn(_("write error")); else warnx(_("write error")); - _exit(EXIT_FAILURE); + _exit(CLOSE_EXIT_CODE); } if (close_stream(stderr) != 0) - _exit(EXIT_FAILURE); + _exit(CLOSE_EXIT_CODE); } #ifndef HAVE_FSYNC |