From: Ruediger Meier Date: Tue, 20 Jun 2017 18:01:32 +0000 (+0200) Subject: misc: fix some broken exit codes X-Git-Tag: v2.31-rc1~267^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=05691d9e8857de4e83b343f042e9f4590f15425d;p=thirdparty%2Futil-linux.git misc: fix some broken exit codes These tools have special exit codes. They got changed mistakenly. See: findfs 0e1fa6b6 fsck 658c0891 fsck.cramfs 922ec175 mkfs.cramfs 16154b1f tunelp 2ab428f6 FIXME: STRTOXX_EXIT_CODE doesn't work as it should. Signed-off-by: Ruediger Meier --- diff --git a/disk-utils/fsck.c b/disk-utils/fsck.c index cb1b21278c..5a418fc1f5 100644 --- a/disk-utils/fsck.c +++ b/disk-utils/fsck.c @@ -55,7 +55,7 @@ #include "fileutils.h" #include "monotonic.h" -#define STRTOXX_EXIT_CODE FSCK_EX_ERROR +#define STRTOXX_EXIT_CODE FSCK_EX_USAGE #include "strutils.h" #define XALLOC_EXIT_CODE FSCK_EX_ERROR diff --git a/disk-utils/fsck.cramfs.c b/disk-utils/fsck.cramfs.c index 63033d626d..952f15332e 100644 --- a/disk-utils/fsck.cramfs.c +++ b/disk-utils/fsck.cramfs.c @@ -671,7 +671,7 @@ int main(int argc, char **argv) break; case 'V': printf(UTIL_LINUX_VERSION); - return EXIT_SUCCESS; + return FSCK_EX_OK; case 'x': opt_extract = 1; if(optarg) diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c index 77b4467e7a..041c6d74ee 100644 --- a/disk-utils/mkfs.cramfs.c +++ b/disk-utils/mkfs.cramfs.c @@ -910,5 +910,5 @@ int main(int argc, char **argv) (warn_namelen|warn_skip|warn_size|warn_uid|warn_gid|warn_dev)) exit(MKFS_EX_ERROR); - return EXIT_SUCCESS; + return MKFS_EX_OK; } diff --git a/misc-utils/findfs.c b/misc-utils/findfs.c index 7935232eba..7d2d803ddb 100644 --- a/misc-utils/findfs.c +++ b/misc-utils/findfs.c @@ -63,11 +63,11 @@ int main(int argc, char **argv) switch (c) { case 'V': printf(UTIL_LINUX_VERSION); - return EXIT_SUCCESS; + return FINDFS_SUCCESS; case 'h': usage(FINDFS_SUCCESS); default: - errtryhelp(EXIT_FAILURE); + errtryhelp(FINDFS_USAGE_ERROR); } dev = blkid_evaluate_tag(argv[1], NULL, NULL); diff --git a/sys-utils/tunelp.c b/sys-utils/tunelp.c index 8cfbe80a21..89afff1baf 100644 --- a/sys-utils/tunelp.c +++ b/sys-utils/tunelp.c @@ -71,14 +71,17 @@ #include "lp.h" #include "nls.h" -#include "xalloc.h" #include "closestream.h" +#define EXIT_LP_MALLOC 2 #define STRTOXX_EXIT_CODE 3 #define EXIT_LP_IO_ERR 4 #include "strutils.h" +#define XALLOC_EXIT_CODE EXIT_LP_MALLOC +#include "xalloc.h" + struct command { long op; long val;