Re: [patches] removing some duplicate includes and standardizing a usage text

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 29, 2014, at 21:40, Sami Kerola wrote:
> You are right. That looks better. Now when you are working with this
> maybe the commands and other documents could be fixed in same go.

Okay, attached patch does that.  The remaining "[...]" in the docs are
appropriate and shouldn't be changed.  The patch also removes some
angular brackets around <shm|msg|sem> as those are literal values
and should not be replaced with anything else.  This mistaken use of
angular brackets occurs more often -- I've been wanting to bring this
up for a long time, but didn't get around to it.

For another issue, see the upcoming message.

Benno

-- 
http://www.fastmail.fm - One of many happy users:
  http://www.fastmail.fm/help/overview_quotes.html

From 8bf64e22f04b71c58bd52b62dd0a24d3fd70694b Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@xxxxxxxxxxxxx>
Date: Wed, 30 Apr 2014 10:38:12 +0200
Subject: [PATCH] textual: remove square brackets from around three dots

Also improve some option descriptions here and there.

Signed-off-by: Benno Schulenberg <bensberg@xxxxxxxxxxxxx>
---
 disk-utils/sfdisk.c  |    6 +++---
 misc-utils/kill.c    |    2 +-
 sys-utils/cytune.8   |    8 ++++----
 sys-utils/cytune.c   |   12 ++++++------
 sys-utils/ipcrm.c    |    8 ++++----
 sys-utils/losetup.c  |   10 +++++-----
 text-utils/hexdump.1 |    2 +-
 7 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c
index bd32aa8..3c55d5e 100644
--- a/disk-utils/sfdisk.c
+++ b/disk-utils/sfdisk.c
@@ -2346,7 +2346,7 @@ static void usage(FILE * out)
 {
 	fputs(USAGE_HEADER, out);
 	fprintf(out,
-		_(" %s [options] <device> [...]\n"),  program_invocation_short_name);
+		_(" %s [options] <device>...\n"),  program_invocation_short_name);
 
 	fputs(USAGE_OPTIONS, out);
 	fputs(_(" -s, --show-size           list size of a partition\n"
@@ -2378,8 +2378,8 @@ static void usage(FILE * out)
 		" -L, --Linux               do not complain about things irrelevant for Linux\n"), out);
 	fputs(_(" -g, --show-geometry       print the kernel's idea of the geometry\n"
 		" -G, --show-pt-geometry    print geometry guessed from the partition table\n"), out);
-	fputs(_(" -A, --activate[=<device>] activate bootable flag\n"
-		" -U, --unhide[=<dev>]      set partition unhidden\n"
+	fputs(_(" -A, --activate[=<device>] activate the bootable flag\n"
+		" -U, --unhide[=<device>]   set partition as unhidden\n"
 		" -x, --show-extended       also list extended partitions in the output,\n"
 		"                             or expect descriptors for them in the input\n"), out);
 	fputs(_("     --leave-last          do not allocate the last cylinder\n"
diff --git a/misc-utils/kill.c b/misc-utils/kill.c
index b30b94f..5d2f27d 100644
--- a/misc-utils/kill.c
+++ b/misc-utils/kill.c
@@ -303,7 +303,7 @@ static int arg_to_signum(char *arg, int maskbit)
 static void __attribute__((__noreturn__)) usage(FILE *out)
 {
 	fputs(USAGE_HEADER, out);
-	fprintf(out, _(" %s [options] <pid|name> [...]\n"), program_invocation_short_name);
+	fprintf(out, _(" %s [options] <pid|name>...\n"), program_invocation_short_name);
 
 	fputs(USAGE_OPTIONS, out);
 	fputs(_(" -a, --all              do not restrict the name-to-pid conversion to processes\n"
diff --git a/sys-utils/cytune.8 b/sys-utils/cytune.8
index 940fa28..3bf7afc 100644
--- a/sys-utils/cytune.8
+++ b/sys-utils/cytune.8
@@ -29,7 +29,7 @@
 cytune \- tune driver parameters for Cyclades-Z multiport serial card
 .SH SYNOPSIS
 .B cytune
-[options] tty [...]
+.RI [options] tty ...
 .SH DESCRIPTION
 .B cytune
 queries and modifies the interruption threshold for the Cyclades driver.
@@ -136,8 +136,8 @@ next open.  Only values between 0 and 255, inclusive, are permitted.  Setting
 to zero forces the default, currently 0x20 (160ms), but soon to be 0x02
 (10ms).  Units are 5 ms.
 .TP
-\fB\-g\fR, \fB\-\-get\-threshold\fR
-Get the current threshold and timeout.
+\fB\-g\fR, \fB\-\-get-threshold\fR
+Get the current threshold and flush timeout values.
 .TP
 \fB\-S\fR, \fB\-\-set\-default\-threshold\fR \fIvalue\fR
 Set the default threshold to
@@ -157,7 +157,7 @@ is next opened, this value will be used instead of the default.  If
 is zero, then the value will default to 0x20 (160ms), soon to be 0x02
 (10ms).
 .TP
-\fB\-G\fR, \fB\-\-get\-glush\fR
+\fB\-G\fR, \fB\-\-get-flush\fR
 Get the default threshold and flush timeout values.
 .TP
 \fB\-q\fR, \fB\-\-stats\fR
diff --git a/sys-utils/cytune.c b/sys-utils/cytune.c
index 8a42f96..15529ff 100644
--- a/sys-utils/cytune.c
+++ b/sys-utils/cytune.c
@@ -89,14 +89,14 @@ static char ***global_argv;
 static void __attribute__ ((__noreturn__)) usage(FILE * out)
 {
 	fprintf(out, USAGE_HEADER);
-	fprintf(out, _(" %s [options] <tty> [...]\n"), program_invocation_short_name);
+	fprintf(out, _(" %s [options] <tty>...\n"), program_invocation_short_name);
 	fprintf(out, USAGE_OPTIONS);
 	fprintf(out, _(" -s, --set-threshold <num>          set interruption threshold value\n"));
-	fprintf(out, _(" -g, --get-threshold                display current threshold value\n"));
-	fprintf(out, _(" -S, --set-default-threshold <num>  set default threshold value\n"));
-	fprintf(out, _(" -t, --set-flush <num>              set flush timeout to value\n"));
-	fprintf(out, _(" -G, --get-flush                    display default flush timeout value\n"));
-	fprintf(out, _(" -T, --set-default-flush <num>      set the default flush timeout to value\n"));
+	fprintf(out, _(" -g, --get-threshold                display the current values\n"));
+	fprintf(out, _(" -S, --set-default-threshold <num>  set the default threshold value\n"));
+	fprintf(out, _(" -t, --set-flush <num>              set the flush timeout\n"));
+	fprintf(out, _(" -G, --get-flush                    display the default values\n"));
+	fprintf(out, _(" -T, --set-default-flush <num>      set the default flush timeout\n"));
 	fprintf(out, _(" -q, --stats                        display statistics about the tty\n"));
 	fprintf(out, _(" -i, --interval <seconds>           gather statistics every <seconds> interval\n"));
 	fprintf(out, USAGE_SEPARATOR);
diff --git a/sys-utils/ipcrm.c b/sys-utils/ipcrm.c
index 46c2997..aa58172 100644
--- a/sys-utils/ipcrm.c
+++ b/sys-utils/ipcrm.c
@@ -43,20 +43,20 @@ typedef enum type_id {
 
 static int verbose = 0;
 
-/* print the new usage */
+/* print the usage */
 static void __attribute__ ((__noreturn__)) usage(FILE * out)
 {
 	fprintf(out, USAGE_HEADER);
 	fprintf(out, " %s [options]\n", program_invocation_short_name);
-	fprintf(out, " %s <shm|msg|sem> <id> [...]\n", program_invocation_short_name);
+	fprintf(out, " %s shm|msg|sem <id>...\n", program_invocation_short_name);
 	fprintf(out, USAGE_OPTIONS);
-	fputs(_(" -m, --shmem-id <id>        remove shared memory segment by shmid\n"), out);
+	fputs(_(" -m, --shmem-id <id>        remove shared memory segment by id\n"), out);
 	fputs(_(" -M, --shmem-key <key>      remove shared memory segment by key\n"), out);
 	fputs(_(" -q, --queue-id <id>        remove message queue by id\n"), out);
 	fputs(_(" -Q, --queue-key <key>      remove message queue by key\n"), out);
 	fputs(_(" -s, --semaphore-id <id>    remove semaphore by id\n"), out);
 	fputs(_(" -S, --semaphore-key <key>  remove semaphore by key\n"), out);
-	fputs(_(" -a, --all[=<shm|msg|sem>]  remove all\n"), out);
+	fputs(_(" -a, --all[=shm|msg|sem]    remove all (in the specified category)\n"), out);
 	fputs(_(" -v, --verbose              explain what is being done\n"), out);
 	fprintf(out, USAGE_SEPARATOR);
 	fprintf(out, USAGE_HELP);
diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c
index 85a15ac..275ae45 100644
--- a/sys-utils/losetup.c
+++ b/sys-utils/losetup.c
@@ -372,18 +372,18 @@ static void usage(FILE *out)
 
 	fputs(USAGE_OPTIONS, out);
 	fputs(_(" -a, --all                     list all used devices\n"), out);
-	fputs(_(" -d, --detach <loopdev> [...]  detach one or more devices\n"), out);
+	fputs(_(" -d, --detach <loopdev>...     detach one or more devices\n"), out);
 	fputs(_(" -D, --detach-all              detach all used devices\n"), out);
 	fputs(_(" -f, --find                    find first unused device\n"), out);
-	fputs(_(" -c, --set-capacity <loopdev>  resize device\n"), out);
+	fputs(_(" -c, --set-capacity <loopdev>  resize the device\n"), out);
 	fputs(_(" -j, --associated <file>       list all devices associated with <file>\n"), out);
 
 	fputs(USAGE_SEPARATOR, out);
 
 	fputs(_(" -o, --offset <num>            start at offset <num> into file\n"), out);
-	fputs(_("     --sizelimit <num>         device limited to <num> bytes of the file\n"), out);
-	fputs(_(" -P, --partscan                create partitioned loop device\n"), out);
-	fputs(_(" -r, --read-only               setup read-only loop device\n"), out);
+	fputs(_("     --sizelimit <num>         device is limited to <num> bytes of the file\n"), out);
+	fputs(_(" -P, --partscan                create a partitioned loop device\n"), out);
+	fputs(_(" -r, --read-only               set up a read-only loop device\n"), out);
 	fputs(_("     --show                    print device name after setup (with -f)\n"), out);
 	fputs(_(" -v, --verbose                 verbose mode\n"), out);
 
diff --git a/text-utils/hexdump.1 b/text-utils/hexdump.1
index e48889b..624b8d3 100644
--- a/text-utils/hexdump.1
+++ b/text-utils/hexdump.1
@@ -36,7 +36,7 @@
 hexdump \- display file contents in ascii, decimal, hexadecimal, or octal
 .SH SYNOPSIS
 .B hexdump
-[options] file [...]
+.RI [options] file ...
 .SH DESCRIPTION
 The
 .B hexdump
-- 
1.7.0.4


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux