]> git.proxmox.com Git - proxmox-mini-journalreader.git/commitdiff
rework usage printing a bit
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 14 May 2019 11:51:34 +0000 (11:51 +0000)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 14 May 2019 12:01:47 +0000 (12:01 +0000)
do most in a single fprintf call and use <format desc> tags

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/mini-journalreader.c

index 4141337c997dadac31ff4414767344e6111307f6..c5a44d4b2e0ca05288b657cecd0ec535c00747de 100644 (file)
@@ -185,17 +185,19 @@ void usage(char *error) {
         fprintf(stderr, "ERROR: %s\n", error);
     }
     fprintf(stderr, "usage: %s [OPTIONS]\n", progname);
-    fprintf(stderr, "  -b begin\tbegin at this UNIX epoch based timestamp\n");
-    fprintf(stderr, "  -e end\tend at this UNIX epoch based timestamp\n");
-    fprintf(stderr, "  -d directory\tpath to journal directory\n");
-    fprintf(stderr, "  -n number\tprint the last number entries\n");
-    fprintf(stderr, "  -f from\tprint from this cursor\n");
-    fprintf(stderr, "  -t to\tprint to this cursor\n");
-    fprintf(stderr, "  -h \t\tthis help\n");
-    fprintf(stderr, "\n");
-    fprintf(stderr, "giving a range conflicts with -n\n");
-    fprintf(stderr, "-b and -f conflict\n");
-    fprintf(stderr, "-e and -t conflict\n");
+    fprintf(stderr,
+        "  -b <timestamp>\tbegin at this UNIX epoch based timestamp\n"
+        "  -e <timestamp>\tend at this UNIX epoch based timestamp\n"
+        "  -d <directory>\tpath to a journal directory\n"
+        "  -n <integer>\t\tprint the last number entries logged\n"
+        "  -f <cursor>\t\tprint from this cursor\n"
+        "  -t <cursor>\t\tprint to this cursor\n"
+        "  -h \t\t\tthis help\n"
+        "\n"
+        "Passing no range option will dump all the available journal\n"
+        "Giving a range conflicts with -n\n"
+        "-b and -f conflict\n"
+        "-e and -t conflict\n");
     exit(error ? 1 : 0);
 }