summaryrefslogtreecommitdiffstats
path: root/disk-utils
diff options
context:
space:
mode:
Diffstat (limited to 'disk-utils')
-rw-r--r--disk-utils/partx.83
-rw-r--r--disk-utils/partx.c9
2 files changed, 11 insertions, 1 deletions
diff --git a/disk-utils/partx.8 b/disk-utils/partx.8
index af7313cb9..7794f41c9 100644
--- a/disk-utils/partx.8
+++ b/disk-utils/partx.8
@@ -106,6 +106,9 @@ or
.B \-\-list
options.
.TP
+.B \-\-output\-all
+Output all available columns.
+.TP
.BR \-P , " \-\-pairs"
List the partitions using the KEY="value" format.
.TP
diff --git a/disk-utils/partx.c b/disk-utils/partx.c
index 43a6448db..3ccd1afad 100644
--- a/disk-utils/partx.c
+++ b/disk-utils/partx.c
@@ -765,6 +765,7 @@ static void __attribute__((__noreturn__)) usage(void)
fputs(_(" -g, --noheadings don't print headings for --show\n"), out);
fputs(_(" -n, --nr <n:m> specify the range of partitions (e.g. --nr 2:4)\n"), out);
fputs(_(" -o, --output <list> define which output columns to use\n"), out);
+ fputs(_(" --output-all output all columns\n"), out);
fputs(_(" -P, --pairs use key=\"value\" output format\n"), out);
fputs(_(" -r, --raw use raw output format\n"), out);
fputs(_(" -S, --sector-size <num> overwrite sector size\n"), out);
@@ -796,7 +797,8 @@ int main(int argc, char **argv)
unsigned int sector_size = 0;
enum {
- OPT_LIST_TYPES = CHAR_MAX + 1
+ OPT_LIST_TYPES = CHAR_MAX + 1,
+ OPT_OUTPUT_ALL
};
static const struct option long_opts[] = {
{ "bytes", no_argument, NULL, 'b' },
@@ -811,6 +813,7 @@ int main(int argc, char **argv)
{ "list-types", no_argument, NULL, OPT_LIST_TYPES },
{ "nr", required_argument, NULL, 'n' },
{ "output", required_argument, NULL, 'o' },
+ { "output-all", no_argument, NULL, OPT_OUTPUT_ALL },
{ "pairs", no_argument, NULL, 'P' },
{ "sector-size",required_argument, NULL, 'S' },
{ "help", no_argument, NULL, 'h' },
@@ -858,6 +861,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 'P':
scols_flags |= PARTX_EXPORT;
what = ACT_SHOW;