]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Merge branch 'fix-exit-codes' of https://github.com/rudimeier/util-linux
authorKarel Zak <kzak@redhat.com>
Mon, 26 Jun 2017 11:47:04 +0000 (13:47 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 26 Jun 2017 11:47:04 +0000 (13:47 +0200)
* 'fix-exit-codes' of https://github.com/rudimeier/util-linux:
  misc: fix optutils.h related exit codes
  misc: fix xalloc.h related exit codes
  misc: fix more strutils related exit codes
  lib: fix strutils.h, remove STRTOXX_EXIT_CODE
  misc: fix some broken exit codes

1  2 
disk-utils/fsck.c
disk-utils/mkfs.cramfs.c
misc-utils/blkid.c
sys-utils/hwclock.c

Simple merge
index 87b378c8138198e3eb0b90e9c4b608d5788ac806,6a6d9a10a6e06b6625200061769d6ef97e113886..74664a81194709c79ec209dae5a42a31a31692f6
@@@ -717,15 -717,7 +717,16 @@@ int main(int argc, char **argv
        textdomain(PACKAGE);
        atexit(close_stdout);
  
 +      if (argc > 1) {
 +              /* first arg may be one of our standard longopts */
 +              if (!strcmp(argv[1], "--help"))
 +                      usage();
 +              if (!strcmp(argv[1], "--version")) {
 +                      printf(UTIL_LINUX_VERSION);
 +                      exit(MKFS_EX_OK);
 +              }
 +      }
+       strutils_set_exitcode(MKFS_EX_USAGE);
  
        /* command line options */
        while ((c = getopt(argc, argv, "hb:Ee:i:n:N:psVvz")) != EOF) {
Simple merge
Simple merge