include/closestream: define exit codes
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
05d8868d86
commit
090d8c763a
|
@ -52,7 +52,6 @@
|
|||
#include "pathnames.h"
|
||||
#include "exitcodes.h"
|
||||
#include "c.h"
|
||||
#include "closestream.h"
|
||||
#include "fileutils.h"
|
||||
#include "monotonic.h"
|
||||
|
||||
|
@ -62,6 +61,9 @@
|
|||
#define XALLOC_EXIT_CODE FSCK_EX_ERROR
|
||||
#include "xalloc.h"
|
||||
|
||||
#define CLOSE_EXIT_CODE FSCK_EX_ERROR
|
||||
#include "closestream.h"
|
||||
|
||||
#ifndef DEFAULT_FSTYPE
|
||||
# define DEFAULT_FSTYPE "ext2"
|
||||
#endif
|
||||
|
|
|
@ -40,11 +40,14 @@
|
|||
|
||||
#include "c.h"
|
||||
#include "cramfs.h"
|
||||
#include "closestream.h"
|
||||
#include "md5.h"
|
||||
#include "nls.h"
|
||||
#include "exitcodes.h"
|
||||
#include "strutils.h"
|
||||
|
||||
#define CLOSE_EXIT_CODE MKFS_EX_ERROR
|
||||
#include "closestream.h"
|
||||
|
||||
#define XALLOC_EXIT_CODE MKFS_EX_ERROR
|
||||
#include "xalloc.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
|
||||
|
|
|
@ -40,8 +40,9 @@
|
|||
#include "strutils.h"
|
||||
#define OPTUTILS_EXIT_CODE BLKID_EXIT_OTHER /* exclusive_option() */
|
||||
#include "optutils.h"
|
||||
|
||||
#define CLOSE_EXIT_CODE BLKID_EXIT_OTHER /* close_stdout() */
|
||||
#include "closestream.h"
|
||||
|
||||
#include "ttyutils.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#define GETOPT_EXIT_CODE 1
|
||||
#define PARAMETER_EXIT_CODE 2
|
||||
#define XALLOC_EXIT_CODE 3
|
||||
#define CLOSE_EXIT_CODE XALLOC_EXIT_CODE
|
||||
#define TEST_EXIT_CODE 4
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
Loading…
Reference in New Issue