]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fincore: add --output-all
authorThomas Weißschuh <thomas@t-8ch.de>
Mon, 31 Jul 2023 16:00:05 +0000 (18:00 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Mon, 31 Jul 2023 16:00:05 +0000 (18:00 +0200)
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
bash-completion/fincore
misc-utils/fincore.1.adoc
misc-utils/fincore.c

index 3639763b56e7c6217630413d7945f6b3e78572bc..f0f9c45f17e547803b975381d5e04aa98ad61ebc 100644 (file)
@@ -30,6 +30,7 @@ _fincore_module()
                                --bytes
                                --noheadings
                                --output
+                               --output-all
                                --raw
                                --help
                                --version
index 54ed23677d341c3f7805f1a041700b4d3fd909ab..4e1797a75628d8222b79907ba929552260d6af25 100644 (file)
@@ -38,6 +38,9 @@ include::man-common/in-bytes.adoc[]
 Define output columns. See the *--help* output to get a list of the currently supported columns. The default list of columns may be extended if _list_ is specified in the format _{plus}list_.
 //TRANSLATORS: Keep {plus} untranslated.
 
+*--output-all*::
+Output all available columns.
+
 *-r*, *--raw*::
 Produce output in raw format. All potentially unsafe characters are hex-escaped (\x<code>).
 
index c92d10b54401a44c3697240fc73443c038f09ba9..d574eae501fbd6fce25c77efb3edb6b9b5761e0f 100644 (file)
@@ -278,6 +278,7 @@ static void __attribute__((__noreturn__)) usage(void)
        fputs(_(" -b, --bytes           print sizes in bytes rather than in human readable format\n"), out);
        fputs(_(" -n, --noheadings      don't print headings\n"), out);
        fputs(_(" -o, --output <list>   output columns\n"), out);
+       fputs(_("     --output-all      output all columns\n"), out);
        fputs(_(" -r, --raw             use raw output format\n"), out);
 
        fputs(USAGE_SEPARATOR, out);
@@ -304,10 +305,14 @@ int main(int argc, char ** argv)
                .pagesize = getpagesize()
        };
 
+       enum {
+               OPT_OUTPUT_ALL = CHAR_MAX + 1
+       };
        static const struct option longopts[] = {
                { "bytes",      no_argument, NULL, 'b' },
                { "noheadings", no_argument, NULL, 'n' },
                { "output",     required_argument, NULL, 'o' },
+               { "output-all", no_argument,       NULL, OPT_OUTPUT_ALL },
                { "version",    no_argument, NULL, 'V' },
                { "help",       no_argument, NULL, 'h' },
                { "json",       no_argument, NULL, 'J' },
@@ -331,6 +336,10 @@ int main(int argc, char ** argv)
                case 'o':
                        outarg = optarg;
                        break;
+               case OPT_OUTPUT_ALL:
+                       for (ncolumns = 0; ncolumns < ARRAY_SIZE(infos); ncolumns++)
+                               columns[ncolumns] = ncolumns;
+                       break;
                case 'J':
                        ctl.json = 1;
                        break;