]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - term-utils/mesg.c
misc: consolidate version printing and close_stdout()
[thirdparty/util-linux.git] / term-utils / mesg.c
index 608f3cf61ace1133f93fab3c6daca5ce9cd62ec8..57d53379f2d7ad785a92ff9090c9cd3823cb28db 100644 (file)
@@ -102,16 +102,16 @@ int main(int argc, char *argv[])
        setlocale(LC_ALL, "");
        bindtextdomain(PACKAGE, LOCALEDIR);
        textdomain(PACKAGE);
-       atexit(close_stdout);
+       close_stdout_atexit();
 
        while ((ch = getopt_long(argc, argv, "vVh", longopts, NULL)) != -1)
                switch (ch) {
                case 'v':
                        verbose = TRUE;
                        break;
+
                case 'V':
-                       printf(UTIL_LINUX_VERSION);
-                       exit(EXIT_SUCCESS);
+                       print_version(EXIT_SUCCESS);
                case 'h':
                        usage();
                default: