summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bash-completion/losetup1
-rw-r--r--sys-utils/losetup.83
-rw-r--r--sys-utils/losetup.c9
3 files changed, 12 insertions, 1 deletions
diff --git a/bash-completion/losetup b/bash-completion/losetup
index b58d8de94..d20726533 100644
--- a/bash-completion/losetup
+++ b/bash-completion/losetup
@@ -63,6 +63,7 @@ _losetup_module()
--list
--noheadings
--output
+ --output-all
--raw
--help
--version"
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;