diff options
author | Sami Kerola | 2018-04-23 22:19:35 +0200 |
---|---|---|
committer | Sami Kerola | 2018-05-03 20:56:20 +0200 |
commit | 289673b1c02374d4f7ae80bb1dd17aabd37d6b14 (patch) | |
tree | 8f68b06310ebf7c2d5470513f0f35fe0ad9c9791 /sys-utils | |
parent | findmnt: add --output-all option (diff) | |
download | kernel-qcow2-util-linux-289673b1c02374d4f7ae80bb1dd17aabd37d6b14.tar.gz kernel-qcow2-util-linux-289673b1c02374d4f7ae80bb1dd17aabd37d6b14.tar.xz kernel-qcow2-util-linux-289673b1c02374d4f7ae80bb1dd17aabd37d6b14.zip |
losetup: add --output-all option
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils')
-rw-r--r-- | sys-utils/losetup.8 | 3 | ||||
-rw-r--r-- | sys-utils/losetup.c | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/sys-utils/losetup.8 b/sys-utils/losetup.8 index cdb9ed052..a7e38f4f4 100644 --- a/sys-utils/losetup.8 +++ b/sys-utils/losetup.8 @@ -145,6 +145,9 @@ print info about all devices. See also \fB\-\-output\fP, \fB\-\-noheadings\fP, Specify the columns that are to be printed for the \fB\-\-list\fP output. Use \fB\-\-help\fR to get a list of all supported columns. .TP +.B \-\-output\-all +Output all available columns. +.TP .BR \-n , " \-\-noheadings" Don't print headings for \fB\-\-list\fP output format. .IP "\fB\-\-raw\fP" diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c index 7c9145a88..670bce2e3 100644 --- a/sys-utils/losetup.c +++ b/sys-utils/losetup.c @@ -430,6 +430,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -l, --list list info about all or specified (default)\n"), out); fputs(_(" -n, --noheadings don't print headings for --list output\n"), out); fputs(_(" -O, --output <cols> specify columns to output for --list\n"), out); + fputs(_(" --output-all output all columns\n"), out); fputs(_(" --raw use raw --list output format\n"), out); fputs(USAGE_SEPARATOR, out); @@ -590,7 +591,8 @@ int main(int argc, char **argv) OPT_SIZELIMIT = CHAR_MAX + 1, OPT_SHOW, OPT_RAW, - OPT_DIO + OPT_DIO, + OPT_OUTPUT_ALL }; static const struct option longopts[] = { { "all", no_argument, NULL, 'a' }, @@ -607,6 +609,7 @@ int main(int argc, char **argv) { "noheadings", no_argument, NULL, 'n' }, { "offset", required_argument, NULL, 'o' }, { "output", required_argument, NULL, 'O' }, + { "output-all", no_argument, NULL, OPT_OUTPUT_ALL }, { "sizelimit", required_argument, NULL, OPT_SIZELIMIT }, { "partscan", no_argument, NULL, 'P' }, { "read-only", no_argument, NULL, 'r' }, @@ -701,6 +704,10 @@ int main(int argc, char **argv) outarg = optarg; list = 1; break; + case OPT_OUTPUT_ALL: + for (ncolumns = 0; ncolumns < ARRAY_SIZE(infos); ncolumns++) + columns[ncolumns] = ncolumns; + break; case 'P': lo_flags |= LO_FLAGS_PARTSCAN; break; |