]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - sys-utils/ipcs.c
su: use lib/pty-session.c code for --pty
[thirdparty/util-linux.git] / sys-utils / ipcs.c
index e63f10afe9ef45382d1504073aa1ad654ac519eb..2d18a13cced6db1640b86f2febf28e2fa4f408ec 100644 (file)
@@ -58,7 +58,7 @@ static void __attribute__((__noreturn__)) usage(void)
 
        fputs(USAGE_OPTIONS, out);
        fputs(_(" -i, --id <id>  print details on resource identified by <id>\n"), out);
-       print_usage_help_options(16);
+       printf(USAGE_HELP_OPTIONS(16));
 
        fputs(USAGE_SEPARATOR, out);
        fputs(_("Resource options:\n"), out);
@@ -76,7 +76,7 @@ static void __attribute__((__noreturn__)) usage(void)
        fputs(_(" -u, --summary     show status summary\n"), out);
        fputs(_("     --human       show sizes in human-readable format\n"), out);
        fputs(_(" -b, --bytes       show sizes in bytes\n"), out);
-       fprintf(out, USAGE_MAN_TAIL("ipcs(1)"));
+       printf(USAGE_MAN_TAIL("ipcs(1)"));
 
        exit(EXIT_SUCCESS);
 }
@@ -108,7 +108,7 @@ int main (int argc, char **argv)
        setlocale(LC_ALL, "");
        bindtextdomain(PACKAGE, LOCALEDIR);
        textdomain(PACKAGE);
-       atexit(close_stdout);
+       close_stdout_atexit();
 
        while ((opt = getopt_long(argc, argv, options, longopts, NULL)) != -1) {
                switch (opt) {
@@ -149,11 +149,11 @@ int main (int argc, char **argv)
                case 'b':
                        unit = IPC_UNIT_BYTES;
                        break;
+
                case 'h':
                        usage();
                case 'V':
-                       printf(UTIL_LINUX_VERSION);
-                       return EXIT_SUCCESS;
+                       print_version(EXIT_SUCCESS);
                default:
                        errtryhelp(EXIT_FAILURE);
                }