]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - schedutils/taskset.c
libmount: fix comment referring to passno field
[thirdparty/util-linux.git] / schedutils / taskset.c
index ca1734f7acd3de66f0db5c4084fc9d80aa28cb44..56db817924dcb268c456618930de18f228b7f550 100644 (file)
@@ -62,7 +62,7 @@ static void __attribute__((__noreturn__)) usage(void)
                " -p, --pid               operate on existing given pid\n"
                " -c, --cpu-list          display and specify cpus in list format\n"
                ));
-       print_usage_help_options(25);
+       printf(USAGE_HELP_OPTIONS(25));
 
        fputs(USAGE_SEPARATOR, out);
        fprintf(out, _(
@@ -78,7 +78,7 @@ static void __attribute__((__noreturn__)) usage(void)
                "    e.g. 0-31:2 is equivalent to mask 0x55555555\n"),
                program_invocation_short_name);
 
-       fprintf(out, USAGE_MAN_TAIL("taskset(1)"));
+       printf(USAGE_MAN_TAIL("taskset(1)"));
        exit(EXIT_SUCCESS);
 }
 
@@ -157,7 +157,7 @@ int main(int argc, char **argv)
        setlocale(LC_ALL, "");
        bindtextdomain(PACKAGE, LOCALEDIR);
        textdomain(PACKAGE);
-       atexit(close_stdout);
+       close_stdout_atexit();
 
        memset(&ts, 0, sizeof(ts));
 
@@ -173,12 +173,11 @@ int main(int argc, char **argv)
                case 'c':
                        ts.use_list = 1;
                        break;
+
                case 'V':
-                       printf(UTIL_LINUX_VERSION);
-                       return EXIT_SUCCESS;
+                       print_version(EXIT_SUCCESS);
                case 'h':
                        usage();
-                       break;
                default:
                        errtryhelp(EXIT_FAILURE);
                }
@@ -245,7 +244,7 @@ int main(int argc, char **argv)
        if (!pid) {
                argv += optind + 1;
                execvp(argv[0], argv);
-               err(EXIT_FAILURE, _("failed to execute %s"), argv[0]);
+               errexec(argv[0]);
        }
 
        return EXIT_SUCCESS;