aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bash-completion/lsclocks4
-rw-r--r--misc-utils/lsclocks.1.adoc3
-rw-r--r--misc-utils/lsclocks.c12
3 files changed, 17 insertions, 2 deletions
diff --git a/bash-completion/lsclocks b/bash-completion/lsclocks
index bd81d88bc2..6048323c95 100644
--- a/bash-completion/lsclocks
+++ b/bash-completion/lsclocks
@@ -15,6 +15,9 @@ _lsclocks_module()
'-o'|'--output')
return 0
;;
+ '--output-all')
+ return 0
+ ;;
'-r'|'--raw')
return 0
;;
@@ -32,6 +35,7 @@ _lsclocks_module()
OPTS="--json
--noheadings
--output
+ --output-all
--raw
--time
--help
diff --git a/misc-utils/lsclocks.1.adoc b/misc-utils/lsclocks.1.adoc
index 5c7f5eac43..1eb8b952a7 100644
--- a/misc-utils/lsclocks.1.adoc
+++ b/misc-utils/lsclocks.1.adoc
@@ -33,6 +33,9 @@ Don't print headings.
Specify which output columns to print. See the *OUTPUT COLUMNS*
section for details of available columns.
+*--output-all*::
+Output all columns.
+
*-r*, *--raw*::
Use raw output format.
diff --git a/misc-utils/lsclocks.c b/misc-utils/lsclocks.c
index 8531e9fe32..b15e69cf3e 100644
--- a/misc-utils/lsclocks.c
+++ b/misc-utils/lsclocks.c
@@ -146,6 +146,7 @@ static void __attribute__((__noreturn__)) usage(void)
fputs(_(" -J, --json use JSON output 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(_(" -t, --time <clock> show current time of single clock\n"), out);
@@ -208,8 +209,7 @@ static clockid_t parse_clock(const char *name)
int main(int argc, char **argv)
{
size_t i, j;
- char c;
- int rc;
+ int c, rc;
const struct colinfo *colinfo;
const struct clockinfo *clockinfo;
@@ -226,9 +226,13 @@ int main(int argc, char **argv)
struct timespec resolution, now;
char buf[FORMAT_TIMESTAMP_MAX];
+ enum {
+ OPT_OUTPUT_ALL = CHAR_MAX + 1
+ };
static const struct option longopts[] = {
{ "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' },
@@ -250,6 +254,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':
json = true;
break;