]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsirq: add -n option
authorKarel Zak <kzak@redhat.com>
Fri, 6 Mar 2020 15:26:06 +0000 (16:26 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 6 Mar 2020 15:26:06 +0000 (16:26 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/lsirq.1
sys-utils/lsirq.c

index 4050643741c56bc6adaac0246be272570eb615d0..7e9117d3278423c1cd25ede07603d5361658e1c8 100644 (file)
@@ -12,6 +12,9 @@ you should avoid using default outputs in your scripts.  Always
 explicitly define expected columns by using \fB\-\-output\fR.
 .SH OPTIONS
 .TP
+.BR \-n , " \-\-noheadings
+Don't print headings.
+.TP
 .BR \-o , " \-\-output " \fIlist\fP
 Specify which output columns to print.  Use \fB\-\-help\fR to get a list of all supported columns.
 The default list of columns may be extended if list is specified in the format +list.
@@ -21,7 +24,7 @@ Specify sort criteria by column name.  See \fB\-\-help\fR output to get column
 names.
 .TP
 .BR \-J , " \-\-json
-Update interrupt output every
+Use JSON output format.
 .TP
 .BR \-V ", " \-\-version
 Display version information and exit.
index 7853af0eee060b57a45f350aa7b47da8c725b581..35e726cd1785d7d90e984258b693a94d91575090 100644 (file)
@@ -60,6 +60,7 @@ static void __attribute__((__noreturn__)) usage(void)
 
        fputs(USAGE_OPTIONS, stdout);
        fputs(_(" -J, --json           use JSON output format\n"), stdout);
+       fputs(_(" -n, --noheadings     don't print headings\n"), stdout);
        fputs(_(" -o, --output <list>  define which output columns to use\n"), stdout);
        fputs(_(" -s, --sort <column>  specify sort column\n"), stdout);
        fputs(USAGE_SEPARATOR, stdout);
@@ -79,6 +80,7 @@ int main(int argc, char **argv)
        };
        static const struct option longopts[] = {
                {"sort", required_argument, NULL, 's'},
+               {"noheadings", no_argument, NULL, 'n'},
                {"output", required_argument, NULL, 'o'},
                {"json", no_argument, NULL, 'J'},
                {"help", no_argument, NULL, 'h'},
@@ -90,11 +92,14 @@ int main(int argc, char **argv)
 
        setlocale(LC_ALL, "");
 
-       while ((c = getopt_long(argc, argv, "o:s:hJV", longopts, NULL)) != -1) {
+       while ((c = getopt_long(argc, argv, "no:s:hJV", longopts, NULL)) != -1) {
                switch (c) {
                case 'J':
                        out.json = 1;
                        break;
+               case 'n':
+                       out.no_headings = 1;
+                       break;
                case 'o':
                        outarg = optarg;
                        break;