summaryrefslogtreecommitdiffstats
path: root/disk-utils
diff options
context:
space:
mode:
authorKarel Zak2018-05-10 12:15:32 +0200
committerKarel Zak2018-05-10 12:15:32 +0200
commitc9fdebcf540147fe3108971fc9c80d505867f711 (patch)
tree41c8567518c27e21cb371af95518a12140778469 /disk-utils
parentMerge branch 'fixes' of https://github.com/yontalcar/util-linux (diff)
parentzramctl: add --output-all option (diff)
downloadkernel-qcow2-util-linux-c9fdebcf540147fe3108971fc9c80d505867f711.tar.gz
kernel-qcow2-util-linux-c9fdebcf540147fe3108971fc9c80d505867f711.tar.xz
kernel-qcow2-util-linux-c9fdebcf540147fe3108971fc9c80d505867f711.zip
Merge branch 'output-all' of https://github.com/kerolasa/lelux-utiliteetit
* 'output-all' of https://github.com/kerolasa/lelux-utiliteetit: zramctl: add --output-all option swapon: add --output-all option rfkill: add --output-all option partx: add --output-all option lsns: add --output-all option lsmem: add --output-all option lslogins: add --output-all option lslocks: add --output-all option lscpu: add --output-all option losetup: add --output-all option findmnt: add --output-all option
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;