]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - disk-utils/mkfs.c
libblkid: check status for the current CDROM slot
[thirdparty/util-linux.git] / disk-utils / mkfs.c
index 5bcd9613cdd7a83b2860c11c63c9115db9cf5727..3c041fab4912d994b1e1c86abeef6c977ba2c9d3 100644 (file)
@@ -10,7 +10,7 @@
  *     Incorporated fix by Jonathan Kamens <jik@annex-1-slip-jik.cam.ov.com>
  * 1999-02-22 Arkadiusz Miƛkiewicz <misiek@pld.ORG.PL>
  * - added Native Language Support
- *     
+ *
  */
 
 /*
@@ -61,12 +61,6 @@ static void __attribute__((__noreturn__)) usage(void)
        exit(EXIT_SUCCESS);
 }
 
-static void __attribute__ ((__noreturn__)) print_version(void)
-{
-       printf(UTIL_LINUX_VERSION);
-       exit(EXIT_SUCCESS);
-}
-
 int main(int argc, char **argv)
 {
        char *progname;         /* name of executable to be called */
@@ -86,10 +80,10 @@ int main(int argc, char **argv)
        setlocale(LC_ALL, "");
        bindtextdomain(PACKAGE, LOCALEDIR);
        textdomain(PACKAGE);
-       atexit(close_stdout);
+       close_stdout_atexit();
 
        if (argc == 2 && !strcmp(argv[1], "-V"))
-               print_version();
+               print_version(EXIT_SUCCESS);
 
        /* Check commandline options. */
        opterr = 0;
@@ -106,7 +100,7 @@ int main(int argc, char **argv)
                case 'h':
                        usage();
                case VERSION_OPTION:
-                       print_version();
+                       print_version(EXIT_SUCCESS);
                default:
                        optind--;
                        more = 1;