]> granicus.if.org Git - psmisc/commitdiff
pstree: use separate fprintf() calls for compilation alternatives
authorBenno Schulenberg <bensberg@telfort.nl>
Sat, 22 Jun 2019 13:34:35 +0000 (15:34 +0200)
committerCraig Small <csmall@enc.com.au>
Thu, 12 Sep 2019 10:42:30 +0000 (20:42 +1000)
Alternative strings should be self-contained, otherwise xgettext()
will glue the strings together into a msgid that will never occur.

Also, add the missing option -T to the synopsis of the command.

src/pstree.c

index e4fed4d9485e906e2cfd7e588a8c29dfca9feec0..6614d8e59570cfb0eb7a1a7ab93a9c1157254ba3 100644 (file)
@@ -1085,16 +1085,21 @@ static void fix_orphans(security_context_t scontext)
 
 static void usage(void)
 {
-    fprintf(stderr,
-            _
-            (
 #ifdef WITH_SELINUX
-             "Usage: pstree [-acglpsStuZ] [ -h | -H PID ] [ -n | -N type ]\n"
+    fprintf(stderr, _(
+             "Usage: pstree [-acglpsStTuZ] [ -h | -H PID ] [ -n | -N type ]\n"
+             "              [ -A | -G | -U ] [ PID | USER ]\n"
+             "   or: pstree -V\n"));
 #else                                 /*WITH_SELINUX */
-             "Usage: pstree [-acglpsStu] [ -h | -H PID ] [ -n | -N type ]\n"
-#endif                                /*WITH_SELINUX */
+    fprintf(stderr, _(
+             "Usage: pstree [-acglpsStTu] [ -h | -H PID ] [ -n | -N type ]\n"
              "              [ -A | -G | -U ] [ PID | USER ]\n"
-             "       pstree -V\n" "Display a tree of processes.\n\n"
+             "   or: pstree -V\n"));
+#endif                                /*WITH_SELINUX */
+    fprintf(stderr, _(
+             "\n"
+             "Display a tree of processes.\n\n"));
+    fprintf(stderr, _(
              "  -a, --arguments     show command line arguments\n"
              "  -A, --ascii         use ASCII line drawing characters\n"
              "  -c, --compact       don't compact identical subtrees\n"