* [PATCH 02/11] docs: improve some wordings on the man page of wipefs
@ 2014-12-29 10:16 Benno Schulenberg
2014-12-29 10:16 ` [PATCH 03/11] ipcs: in usage show resource option as nonoptional when used with -i Benno Schulenberg
` (9 more replies)
0 siblings, 10 replies; 15+ messages in thread
From: Benno Schulenberg @ 2014-12-29 10:16 UTC (permalink / raw)
To: util-linux
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
misc-utils/wipefs.8 | 33 +++++++++++++++++----------------
1 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/misc-utils/wipefs.8 b/misc-utils/wipefs.8
index 13cadb4..c4addef 100644
--- a/misc-utils/wipefs.8
+++ b/misc-utils/wipefs.8
@@ -2,7 +2,7 @@
.\" Copyright 2009 by Karel Zak. All Rights Reserved.
.\" This file may be copied under the terms of the GNU Public License.
.\"
-.TH WIPEFS 8 "October 2009" "util-linux" "System Administration"
+.TH WIPEFS 8 "December 2014" "util-linux" "System Administration"
.SH NAME
wipefs \- wipe a signature from a device
.SH SYNOPSIS
@@ -20,41 +20,42 @@ to make the signatures invisible for libblkid.
.B wipefs
does not erase the filesystem itself nor any other data from the device.
-When used without options \fB-a\fR or \fB-o\fR, it lists all visible filesystems
+When used without any options, \fBwipefs\fR lists all visible filesystems
and the offsets of their basic signatures.
.B wipefs
-calls BLKRRPART ioctl when erase partition table to inform kernel about the change.
+calls the BLKRRPART ioctl when it has erased a partition-table signature
+to inform the kernel about the change.
-Note that some filesystems or some partition tables store more magic strings on
-the devices. The
+Note that some filesystems and some partition tables store more magic strings on
+the device. The
.B wipefs
command lists only the first offset where a magic string has been detected. The device
is not scanned for additional magic strings for the same filesystem. It is possible
-that after \fBwipefs -o \fIoffset\fR the same filesystem or partition
-table will still be visible by another magic string on another offset.
+that after a \fBwipefs -o \fIoffset\fR the same filesystem or partition
+table will still be visible because of another magic string on another offset.
-When used with option \fB-a\fR, all magic strings that are visible for libblkid are
+When option \fB-a\fR is used, all magic strings that are visible for libblkid are
erased.
Note that by default
.B wipefs
-does not erase nested partition tables on non-whole disk devices. The option
-\-\-force is required.
+does not erase nested partition tables on non-whole disk devices.
+For this the option \fB\-\-force\fR is required.
.SH OPTIONS
.TP
.BR \-a , " \-\-all"
Erase all available signatures. The set of erased signatures can be
-restricted with the \fB\-t\fP \fIlist\fP option.
+restricted with the \fB\-t\fR option.
.TP
.BR \-b , " \-\-backup"
Create a signature backup to the file $HOME/wipefs-<devname>-<offset>.bak.
-For more details see EXAMPLES section.
+For more details see the \fBEXAMPLES\fR section.
.TP
.BR \-f , " \-\-force"
Force erasure, even if the filesystem is mounted. This is required in
-order to erase the partition table on a block device.
+order to erase a partition-table signature on a block device.
.TP
.BR \-h , " \-\-help"
Display help text and exit.
@@ -66,7 +67,7 @@ Causes everything to be done except for the write() call.
Specify the location (in bytes) of the signature which should be erased from the
device. The \fIoffset\fR number may include a "0x" prefix; then the number will be
interpreted as a hex value. It is possible to specify multiple \fB-o\fR options.
-
+.sp
The \fIoffset\fR argument may be followed by the multiplicative
suffixes KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB
(the "iB" is optional, e.g. "K" has the same meaning as "KiB"), or the suffixes
@@ -77,7 +78,7 @@ Print out in parsable instead of printable format. Encode all potentially unsaf
characters of a string to the corresponding hex value prefixed by '\\x'.
.TP
.BR \-q , " \-\-quiet"
-Suppress output messages after successful signature wipe.
+Suppress any messages after a successful signature wipe.
.TP
.BR \-t , " \-\-types " \fIlist\fP
Limit the set of printed or erased signatures. More than one type may
@@ -94,7 +95,7 @@ Erases all signatures from the device /dev/sdb and creates a signature backup
file ~/wipefs-sdb-<offset>.bak for each signature.
.TP
.BR "dd if=~/wipefs-sdb-0x00000438.bak of=/dev/sdb seek=$((0x00000438)) bs=1 conv=notrunc"
-Restores ext2 signature from the backup file ~/wipefs-sdb-0x00000438.bak.
+Restores an ext2 signature from the backup file ~/wipefs-sdb-0x00000438.bak.
.SH AUTHOR
Karel Zak <kzak@redhat.com>
.SH ENVIRONMENT
--
1.7.0.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 03/11] ipcs: in usage show resource option as nonoptional when used with -i
2014-12-29 10:16 [PATCH 02/11] docs: improve some wordings on the man page of wipefs Benno Schulenberg
@ 2014-12-29 10:16 ` Benno Schulenberg
2014-12-29 10:16 ` [PATCH 04/11] ipcrm: gettextize the command synopsis of the usage text Benno Schulenberg
` (8 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Benno Schulenberg @ 2014-12-29 10:16 UTC (permalink / raw)
To: util-linux
Also, the resource option -a is not valid with -i, so show the valid
ones explicitly. Also gettextize the synopsis as a single string, as
the two lines are tightly related and other synopses do this too.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
sys-utils/ipcs.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c
index 3bfba0a..6029451 100644
--- a/sys-utils/ipcs.c
+++ b/sys-utils/ipcs.c
@@ -50,8 +50,8 @@ static void print_msg (int id, int unit);
static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
fprintf(out, USAGE_HEADER);
- fprintf(out, " %s [resource ...] [output-format]\n", program_invocation_short_name);
- fprintf(out, " %s [resource] -i <id>\n", program_invocation_short_name);
+ fprintf(out, _(" %1$s [resource-option...] [output-option]\n"
+ " %1$s -m|-q|-s -i <id>\n"), program_invocation_short_name);
fputs(USAGE_SEPARATOR, out);
fputs(_("Show information on IPC facilities.\n"), out);
@@ -67,7 +67,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
fputs(_(" -s, --semaphores semaphores\n"), out);
fputs(_(" -a, --all all (default)\n"), out);
fprintf(out, USAGE_SEPARATOR);
- fputs(_("Output format:\n"), out);
+ fputs(_("Output options:\n"), out);
fputs(_(" -t, --time show attach, detach and change times\n"), out);
fputs(_(" -p, --pid show PIDs of creator and last operator\n"), out);
fputs(_(" -c, --creator show creator and owner\n"), out);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 04/11] ipcrm: gettextize the command synopsis of the usage text
2014-12-29 10:16 [PATCH 02/11] docs: improve some wordings on the man page of wipefs Benno Schulenberg
2014-12-29 10:16 ` [PATCH 03/11] ipcs: in usage show resource option as nonoptional when used with -i Benno Schulenberg
@ 2014-12-29 10:16 ` Benno Schulenberg
2014-12-29 10:17 ` [PATCH 05/11] docs: restore the alternative form of setarch in its man page Benno Schulenberg
` (7 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Benno Schulenberg @ 2014-12-29 10:16 UTC (permalink / raw)
To: util-linux
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
sys-utils/ipcrm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys-utils/ipcrm.c b/sys-utils/ipcrm.c
index 6702631..a877f0c 100644
--- a/sys-utils/ipcrm.c
+++ b/sys-utils/ipcrm.c
@@ -47,8 +47,8 @@ static int verbose = 0;
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 [options]\n"
+ " %s shm|msg|sem <id>...\n"), program_invocation_short_name);
fputs(USAGE_SEPARATOR, out);
fputs(_("Remove certain IPC resources.\n"), out);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 05/11] docs: restore the alternative form of setarch in its man page
2014-12-29 10:16 [PATCH 02/11] docs: improve some wordings on the man page of wipefs Benno Schulenberg
2014-12-29 10:16 ` [PATCH 03/11] ipcs: in usage show resource option as nonoptional when used with -i Benno Schulenberg
2014-12-29 10:16 ` [PATCH 04/11] ipcrm: gettextize the command synopsis of the usage text Benno Schulenberg
@ 2014-12-29 10:17 ` Benno Schulenberg
2014-12-29 10:17 ` [PATCH 06/11] setarch: make the usage synopsis comprehensible for translators Benno Schulenberg
` (6 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Benno Schulenberg @ 2014-12-29 10:17 UTC (permalink / raw)
To: util-linux
Commit c372860ddb4a768f7f6c50cd26d60119370d5cd accidentally removed
the alternative form of setarch in which the command name specifies
the architecture to be set. Also improve some formatting.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
sys-utils/setarch.8 | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/sys-utils/setarch.8 b/sys-utils/setarch.8
index ad9d4c2..a9a126a 100644
--- a/sys-utils/setarch.8
+++ b/sys-utils/setarch.8
@@ -1,4 +1,4 @@
-.TH SETARCH 8 "July 2014" "util-linux" "System Administration"
+.TH SETARCH 8 "December 2014" "util-linux" "System Administration"
.SH NAME
setarch \- change reported architecture in new program environment and set personality flags
.SH SYNOPSIS
@@ -6,21 +6,22 @@ setarch \- change reported architecture in new program environment and set perso
.I arch
[options]
.RI [ program
-.RI [ arguments ]]
+.RI [ argument ...]]
+.sp
+.B arch
+[options]
+.RI [ program
+.RI [ argument ...]]
.sp
.B setarch
.BR \-\-list | \-h | \-V
.SH DESCRIPTION
.B setarch
currently only affects the output of \fBuname -m\fR.
-For example, on an AMD64 system, running 'setarch i386 program' will cause 'program' to see
-.IR i686
-instead of
-.IR x86_64
-as the machine type. It also allows to set various personality options.
-The default
-.B program
-is /bin/sh.
+For example, on an AMD64 system, running \fBsetarch i386 \fIprogram\fR
+will cause \fIprogram\fR to see i686 instead of x86_64 as the machine type.
+It also allows to set various personality options.
+The default \fIprogram\fR is \fB/bin/sh\fR.
.SH OPTIONS
.TP
\fB\-\-list\fR
--
1.7.0.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 06/11] setarch: make the usage synopsis comprehensible for translators
2014-12-29 10:16 [PATCH 02/11] docs: improve some wordings on the man page of wipefs Benno Schulenberg
` (2 preceding siblings ...)
2014-12-29 10:17 ` [PATCH 05/11] docs: restore the alternative form of setarch in its man page Benno Schulenberg
@ 2014-12-29 10:17 ` Benno Schulenberg
2014-12-29 10:17 ` [PATCH 07/11] textual: list the options of setarch in a more alphabetical order Benno Schulenberg
` (5 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Benno Schulenberg @ 2014-12-29 10:17 UTC (permalink / raw)
To: util-linux
Use two separate strings for the two different forms of setarch,
instead of filling in an untranslated word into a single string.
Also use the standard angular brackets for nonliteral arguments.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
sys-utils/setarch.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
index 0943038..518eaca 100644
--- a/sys-utils/setarch.c
+++ b/sys-utils/setarch.c
@@ -91,9 +91,10 @@ enum {
static void __attribute__((__noreturn__)) show_help(void)
{
fputs(USAGE_HEADER, stdout);
- printf(_(" %s%s [options] [program [program arguments]]\n"),
- program_invocation_short_name,
- !strcmp(program_invocation_short_name, "setarch") ? " <arch>" : "");
+ if (!strcmp(program_invocation_short_name, "setarch"))
+ printf(_(" %s <arch> [options] [<program> [<argument>...]]\n"), program_invocation_short_name);
+ else
+ printf(_(" %s [options] [<program> [<argument>...]]\n"), program_invocation_short_name);
fputs(USAGE_SEPARATOR, stdout);
fputs(_("Change the reported architecture and set personality flags.\n"), stdout);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 07/11] textual: list the options of setarch in a more alphabetical order
2014-12-29 10:16 [PATCH 02/11] docs: improve some wordings on the man page of wipefs Benno Schulenberg
` (3 preceding siblings ...)
2014-12-29 10:17 ` [PATCH 06/11] setarch: make the usage synopsis comprehensible for translators Benno Schulenberg
@ 2014-12-29 10:17 ` Benno Schulenberg
2014-12-29 10:17 ` [PATCH 08/11] colcrt: slice up the usage text for ease of translation Benno Schulenberg
` (4 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Benno Schulenberg @ 2014-12-29 10:17 UTC (permalink / raw)
To: util-linux
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
sys-utils/setarch.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
index 518eaca..8e52179 100644
--- a/sys-utils/setarch.c
+++ b/sys-utils/setarch.c
@@ -100,24 +100,26 @@ static void __attribute__((__noreturn__)) show_help(void)
fputs(_("Change the reported architecture and set personality flags.\n"), stdout);
fputs(USAGE_OPTIONS, stdout);
- fputs(_(" -v, --verbose says what options are being switched on\n"), stdout);
- fputs(_(" -R, --addr-no-randomize disables randomization of the virtual address space\n"), stdout);
- fputs(_(" -F, --fdpic-funcptrs makes function pointers point to descriptors\n"), stdout);
- fputs(_(" -Z, --mmap-page-zero turns on MMAP_PAGE_ZERO\n"), stdout);
- fputs(_(" -L, --addr-compat-layout changes the way virtual memory is allocated\n"), stdout);
- fputs(_(" -X, --read-implies-exec turns on READ_IMPLIES_EXEC\n"), stdout);
fputs(_(" -B, --32bit turns on ADDR_LIMIT_32BIT\n"), stdout);
+ fputs(_(" -F, --fdpic-funcptrs makes function pointers point to descriptors\n"), stdout);
fputs(_(" -I, --short-inode turns on SHORT_INODE\n"), stdout);
+ fputs(_(" -L, --addr-compat-layout changes the way virtual memory is allocated\n"), stdout);
+ fputs(_(" -R, --addr-no-randomize disables randomization of the virtual address space\n"), stdout);
fputs(_(" -S, --whole-seconds turns on WHOLE_SECONDS\n"), stdout);
fputs(_(" -T, --sticky-timeouts turns on STICKY_TIMEOUTS\n"), stdout);
+ fputs(_(" -X, --read-implies-exec turns on READ_IMPLIES_EXEC\n"), stdout);
+ fputs(_(" -Z, --mmap-page-zero turns on MMAP_PAGE_ZERO\n"), stdout);
fputs(_(" -3, --3gb limits the used address space to a maximum of 3 GB\n"), stdout);
fputs(_(" --4gb ignored (for backward compatibility only)\n"), stdout);
fputs(_(" --uname-2.6 turns on UNAME26\n"), stdout);
+ fputs(_(" -v, --verbose say what options are being switched on\n"), stdout);
fputs(_(" --list list settable architectures, and exit\n"), stdout);
+
fputs(USAGE_SEPARATOR, stdout);
fputs(USAGE_HELP, stdout);
fputs(USAGE_VERSION, stdout);
printf(USAGE_MAN_TAIL("setarch(8)"));
+
exit(EXIT_SUCCESS);
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 08/11] colcrt: slice up the usage text for ease of translation
2014-12-29 10:16 [PATCH 02/11] docs: improve some wordings on the man page of wipefs Benno Schulenberg
` (4 preceding siblings ...)
2014-12-29 10:17 ` [PATCH 07/11] textual: list the options of setarch in a more alphabetical order Benno Schulenberg
@ 2014-12-29 10:17 ` Benno Schulenberg
2014-12-29 10:17 ` [PATCH 09/11] look: " Benno Schulenberg
` (3 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Benno Schulenberg @ 2014-12-29 10:17 UTC (permalink / raw)
To: util-linux
Also use the standard macros for outputting it.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
text-utils/colcrt.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/text-utils/colcrt.c b/text-utils/colcrt.c
index 31ce52a..da2250b 100644
--- a/text-utils/colcrt.c
+++ b/text-utils/colcrt.c
@@ -317,12 +317,13 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
fputs(_("Filter nroff output for CRT previewing.\n"), out);
fputs(USAGE_OPTIONS, out);
- fprintf(out,
- _(" -, --no-underlining suppress all underlining\n"
- " -2, --half-lines print all half-lines\n"
- " -V, --version output version information and exit\n"
- " -h, --help display this help and exit\n\n"));
+ fputs(_(" -, --no-underlining suppress all underlining\n"), out);
+ fputs(_(" -2, --half-lines print all half-lines\n"), out);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(USAGE_HELP, out);
+ fputs(USAGE_VERSION, out);
fprintf(out, USAGE_MAN_TAIL("colcrt(1)"));
+
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 09/11] look: slice up the usage text for ease of translation
2014-12-29 10:16 [PATCH 02/11] docs: improve some wordings on the man page of wipefs Benno Schulenberg
` (5 preceding siblings ...)
2014-12-29 10:17 ` [PATCH 08/11] colcrt: slice up the usage text for ease of translation Benno Schulenberg
@ 2014-12-29 10:17 ` Benno Schulenberg
2014-12-29 10:17 ` [PATCH 10/11] tailf: " Benno Schulenberg
` (2 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Benno Schulenberg @ 2014-12-29 10:17 UTC (permalink / raw)
To: util-linux
Also use the standard macros, and correct the synopsis: use angular
brackets and show that look accepts multiple files.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
misc-utils/look.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/misc-utils/look.c b/misc-utils/look.c
index 50bc4f4..dc6a8d0 100644
--- a/misc-utils/look.c
+++ b/misc-utils/look.c
@@ -364,20 +364,21 @@ compare(char *s2, char *s2end) {
static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
fputs(USAGE_HEADER, out);
- fprintf(out,
- _(" %s [options] string [file]\n"), program_invocation_short_name);
+ fprintf(out, _(" %s [options] <string> [<file>...]\n"), program_invocation_short_name);
fputs(USAGE_SEPARATOR, out);
fputs(_("Display lines beginning with a specified string.\n"), out);
fputs(USAGE_OPTIONS, out);
- fputs(_(" -a, --alternative use alternative dictionary\n"
- " -d, --alphanum compare only alphanumeric characters\n"
- " -f, --ignore-case ignore case differences when comparing\n"
- " -t, --terminate <char> define string termination character\n"
- " -V, --version output version information and exit\n"
- " -h, --help display this help and exit\n\n"), out);
+ fputs(_(" -a, --alternative use the alternative dictionary\n"), out);
+ fputs(_(" -d, --alphanum compare only alphanumeric characters\n"), out);
+ fputs(_(" -f, --ignore-case ignore case differences when comparing\n"), out);
+ fputs(_(" -t, --terminate <char> define the string-termination character\n"), out);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(USAGE_HELP, out);
+ fputs(USAGE_VERSION, out);
fprintf(out, USAGE_MAN_TAIL("look(1)"));
+
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 10/11] tailf: slice up the usage text for ease of translation
2014-12-29 10:16 [PATCH 02/11] docs: improve some wordings on the man page of wipefs Benno Schulenberg
` (6 preceding siblings ...)
2014-12-29 10:17 ` [PATCH 09/11] look: " Benno Schulenberg
@ 2014-12-29 10:17 ` Benno Schulenberg
2014-12-29 10:17 ` [PATCH 11/11] ipc*: use customary fputs() instead of fprintf() with the usage macros Benno Schulenberg
2015-01-06 13:13 ` [PATCH 02/11] docs: improve some wordings on the man page of wipefs Karel Zak
9 siblings, 0 replies; 15+ messages in thread
From: Benno Schulenberg @ 2014-12-29 10:17 UTC (permalink / raw)
To: util-linux
Also use the standard macros and angular brackets for presenting it.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
text-utils/tailf.c | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/text-utils/tailf.c b/text-utils/tailf.c
index cf22a1e..6adb050 100644
--- a/text-utils/tailf.c
+++ b/text-utils/tailf.c
@@ -193,22 +193,21 @@ watch_file_inotify(const char *filename, off_t *size)
static void __attribute__ ((__noreturn__)) usage(FILE *out)
{
- fprintf(out,
- _("\nUsage:\n"
- " %s [option] file\n"),
- program_invocation_short_name);
+ fputs(USAGE_HEADER, out);
+ fprintf(out, _(" %s [option] <file>\n"), program_invocation_short_name);
fputs(USAGE_SEPARATOR, out);
fputs(_("Follow the growth of a log file.\n"), out);
- fprintf(out, _(
- "\nOptions:\n"
- " -n, --lines NUMBER output the last NUMBER lines\n"
- " -NUMBER same as `-n NUMBER'\n"
- " -V, --version output version information and exit\n"
- " -h, --help display this help and exit\n\n"));
+ fputs(USAGE_OPTIONS, out);
+ fputs(_(" -n, --lines <number> output the last <number> lines\n"), out);
+ fputs(_(" -<number> same as '-n <number>'\n"), out);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(USAGE_HELP, out);
+ fputs(USAGE_VERSION, out);
fprintf(out, USAGE_MAN_TAIL("tailf(1)"));
+
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 11/11] ipc*: use customary fputs() instead of fprintf() with the usage macros
2014-12-29 10:16 [PATCH 02/11] docs: improve some wordings on the man page of wipefs Benno Schulenberg
` (7 preceding siblings ...)
2014-12-29 10:17 ` [PATCH 10/11] tailf: " Benno Schulenberg
@ 2014-12-29 10:17 ` Benno Schulenberg
2015-01-06 13:13 ` [PATCH 02/11] docs: improve some wordings on the man page of wipefs Karel Zak
9 siblings, 0 replies; 15+ messages in thread
From: Benno Schulenberg @ 2014-12-29 10:17 UTC (permalink / raw)
To: util-linux
Also use the clearer word <number> with the --semaphore option.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
sys-utils/ipcmk.c | 11 ++++++-----
sys-utils/ipcrm.c | 10 ++++++----
sys-utils/ipcs.c | 13 ++++++++-----
3 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/sys-utils/ipcmk.c b/sys-utils/ipcmk.c
index eae4935..ff768c7 100644
--- a/sys-utils/ipcmk.c
+++ b/sys-utils/ipcmk.c
@@ -62,7 +62,7 @@ static int create_sem(int nsems, int permission)
static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
- fprintf(out, USAGE_HEADER);
+ fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
fputs(USAGE_SEPARATOR, out);
@@ -70,14 +70,15 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
fputs(USAGE_OPTIONS, out);
fputs(_(" -M, --shmem <size> create shared memory segment of size <size>\n"), out);
- fputs(_(" -S, --semaphore <nsems> create semaphore array with <nsems> elements\n"), out);
+ fputs(_(" -S, --semaphore <number> create semaphore array with <number> elements\n"), out);
fputs(_(" -Q, --queue create message queue\n"), out);
fputs(_(" -p, --mode <mode> permission for the resource (default is 0644)\n"), out);
- fprintf(out, USAGE_SEPARATOR);
- fprintf(out, USAGE_HELP);
- fprintf(out, USAGE_VERSION);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(USAGE_HELP, out);
+ fputs(USAGE_VERSION, out);
fprintf(out, USAGE_MAN_TAIL("ipcmk(1)"));
+
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
diff --git a/sys-utils/ipcrm.c b/sys-utils/ipcrm.c
index a877f0c..85de05a 100644
--- a/sys-utils/ipcrm.c
+++ b/sys-utils/ipcrm.c
@@ -46,7 +46,7 @@ static int verbose = 0;
/* print the usage */
static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
- fprintf(out, USAGE_HEADER);
+ fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options]\n"
" %s shm|msg|sem <id>...\n"), program_invocation_short_name);
@@ -62,10 +62,12 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
fputs(_(" -S, --semaphore-key <key> remove semaphore by key\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);
- fprintf(out, USAGE_VERSION);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(USAGE_HELP, out);
+ fputs(USAGE_VERSION, out);
fprintf(out, USAGE_MAN_TAIL("ipcrm(1)"));
+
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c
index 6029451..74d8766 100644
--- a/sys-utils/ipcs.c
+++ b/sys-utils/ipcs.c
@@ -49,7 +49,7 @@ static void print_msg (int id, int unit);
static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
- fprintf(out, USAGE_HEADER);
+ fputs(USAGE_HEADER, out);
fprintf(out, _(" %1$s [resource-option...] [output-option]\n"
" %1$s -m|-q|-s -i <id>\n"), program_invocation_short_name);
@@ -58,15 +58,17 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
fputs(USAGE_OPTIONS, out);
fputs(_(" -i, --id <id> print details on resource identified by <id>\n"), out);
- fprintf(out, USAGE_HELP);
- fprintf(out, USAGE_VERSION);
- fprintf(out, USAGE_SEPARATOR);
+ fputs(USAGE_HELP, out);
+ fputs(USAGE_VERSION, out);
+
+ fputs(USAGE_SEPARATOR, out);
fputs(_("Resource options:\n"), out);
fputs(_(" -m, --shmems shared memory segments\n"), out);
fputs(_(" -q, --queues message queues\n"), out);
fputs(_(" -s, --semaphores semaphores\n"), out);
fputs(_(" -a, --all all (default)\n"), out);
- fprintf(out, USAGE_SEPARATOR);
+
+ fputs(USAGE_SEPARATOR, out);
fputs(_("Output options:\n"), out);
fputs(_(" -t, --time show attach, detach and change times\n"), out);
fputs(_(" -p, --pid show PIDs of creator and last operator\n"), out);
@@ -76,6 +78,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
fputs(_(" --human show sizes in human-readable format\n"), out);
fputs(_(" -b, --bytes show sizes in bytes\n"), out);
fprintf(out, USAGE_MAN_TAIL("ipcs(1)"));
+
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 02/11] docs: improve some wordings on the man page of wipefs
2014-12-29 10:16 [PATCH 02/11] docs: improve some wordings on the man page of wipefs Benno Schulenberg
` (8 preceding siblings ...)
2014-12-29 10:17 ` [PATCH 11/11] ipc*: use customary fputs() instead of fprintf() with the usage macros Benno Schulenberg
@ 2015-01-06 13:13 ` Karel Zak
2015-01-06 13:26 ` Sami Kerola
2015-01-06 21:08 ` Benno Schulenberg
9 siblings, 2 replies; 15+ messages in thread
From: Karel Zak @ 2015-01-06 13:13 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: util-linux
On Mon, Dec 29, 2014 at 11:16:57AM +0100, Benno Schulenberg wrote:
> misc-utils/wipefs.8 | 33 +++++++++++++++++----------------
> 1 files changed, 17 insertions(+), 16 deletions(-)
Grrr... I see you resent the patches :-)
Please, please, use --in-reply-to= or at least "V2" in subject
next time when you re-send patches. I thought it's another set of
patches.
Or ideally use github to keep your patches up to date in some task
specific branch, then I can merge all by one git-pull command. In
this case is enough to send to mailing list info that you have
updated the patches. (Ask Sami for more details, he uses this way :-)
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 02/11] docs: improve some wordings on the man page of wipefs
2015-01-06 13:13 ` [PATCH 02/11] docs: improve some wordings on the man page of wipefs Karel Zak
@ 2015-01-06 13:26 ` Sami Kerola
2015-01-06 13:30 ` Karel Zak
2015-01-06 21:08 ` Benno Schulenberg
1 sibling, 1 reply; 15+ messages in thread
From: Sami Kerola @ 2015-01-06 13:26 UTC (permalink / raw)
To: Karel Zak; +Cc: Benno Schulenberg, util-linux
On 6 January 2015 at 13:13, Karel Zak <kzak@redhat.com> wrote:
> On Mon, Dec 29, 2014 at 11:16:57AM +0100, Benno Schulenberg wrote:
>> misc-utils/wipefs.8 | 33 +++++++++++++++++----------------
>> 1 files changed, 17 insertions(+), 16 deletions(-)
>
> Grrr... I see you resent the patches :-)
>
> Please, please, use --in-reply-to= or at least "V2" in subject
> next time when you re-send patches. I thought it's another set of
> patches.
>
> Or ideally use github to keep your patches up to date in some task
> specific branch, then I can merge all by one git-pull command. In
> this case is enough to send to mailing list info that you have
> updated the patches. (Ask Sami for more details, he uses this way :-)
I rather send update to Documentation/howto-contribute.txt how to sent
remote branch requests. The description will be technically OK, and
Benno will end up fixing the engrish again ;-)
--
Sami Kerola
http://www.iki.fi/kerolasa/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 02/11] docs: improve some wordings on the man page of wipefs
2015-01-06 13:26 ` Sami Kerola
@ 2015-01-06 13:30 ` Karel Zak
2015-01-06 22:51 ` Sami Kerola
0 siblings, 1 reply; 15+ messages in thread
From: Karel Zak @ 2015-01-06 13:30 UTC (permalink / raw)
To: kerolasa; +Cc: Benno Schulenberg, util-linux
On Tue, Jan 06, 2015 at 01:26:44PM +0000, Sami Kerola wrote:
> On 6 January 2015 at 13:13, Karel Zak <kzak@redhat.com> wrote:
> > On Mon, Dec 29, 2014 at 11:16:57AM +0100, Benno Schulenberg wrote:
> >> misc-utils/wipefs.8 | 33 +++++++++++++++++----------------
> >> 1 files changed, 17 insertions(+), 16 deletions(-)
> >
> > Grrr... I see you resent the patches :-)
> >
> > Please, please, use --in-reply-to= or at least "V2" in subject
> > next time when you re-send patches. I thought it's another set of
> > patches.
> >
> > Or ideally use github to keep your patches up to date in some task
> > specific branch, then I can merge all by one git-pull command. In
> > this case is enough to send to mailing list info that you have
> > updated the patches. (Ask Sami for more details, he uses this way :-)
>
> I rather send update to Documentation/howto-contribute.txt how to sent
> remote branch requests. The description will be technically OK, and
> Benno will end up fixing the engrish again ;-)
It would be nice to have description for all the work flow and how to
use git in this case (which git commands and how) for people who are
not familiar with git and github.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 02/11] docs: improve some wordings on the man page of wipefs
2015-01-06 13:13 ` [PATCH 02/11] docs: improve some wordings on the man page of wipefs Karel Zak
2015-01-06 13:26 ` Sami Kerola
@ 2015-01-06 21:08 ` Benno Schulenberg
1 sibling, 0 replies; 15+ messages in thread
From: Benno Schulenberg @ 2015-01-06 21:08 UTC (permalink / raw)
To: Karel Zak; +Cc: Util-Linux
On Tue, Jan 6, 2015, at 14:13, Karel Zak wrote:
> Grrr... I see you resent the patches :-)
>
> Please, please, use --in-reply-to= or at least "V2" in subject
> next time when you re-send patches.
Okay, I will try. But it shouldn't be necessary: you can count on me
taking care that my patches apply cleanly.
> Or ideally use github to keep your patches up to date in some task
> specific branch, [...]
I won't be using github, as I object to the terms of use.
Benno
--
http://www.fastmail.com - Send your email first class
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 02/11] docs: improve some wordings on the man page of wipefs
2015-01-06 13:30 ` Karel Zak
@ 2015-01-06 22:51 ` Sami Kerola
0 siblings, 0 replies; 15+ messages in thread
From: Sami Kerola @ 2015-01-06 22:51 UTC (permalink / raw)
To: Karel Zak; +Cc: Benno Schulenberg, util-linux
On 6 January 2015 at 13:30, Karel Zak <kzak@redhat.com> wrote:
> On Tue, Jan 06, 2015 at 01:26:44PM +0000, Sami Kerola wrote:
>> On 6 January 2015 at 13:13, Karel Zak <kzak@redhat.com> wrote:
>> > On Mon, Dec 29, 2014 at 11:16:57AM +0100, Benno Schulenberg wrote:
>> >> misc-utils/wipefs.8 | 33 +++++++++++++++++----------------
>> >> 1 files changed, 17 insertions(+), 16 deletions(-)
>> >
>> > Grrr... I see you resent the patches :-)
>> >
>> > Please, please, use --in-reply-to= or at least "V2" in subject
>> > next time when you re-send patches. I thought it's another set of
>> > patches.
>> >
>> > Or ideally use github to keep your patches up to date in some task
>> > specific branch, then I can merge all by one git-pull command. In
>> > this case is enough to send to mailing list info that you have
>> > updated the patches. (Ask Sami for more details, he uses this way :-)
>>
>> I rather send update to Documentation/howto-contribute.txt how to sent
>> remote branch requests. The description will be technically OK, and
>> Benno will end up fixing the engrish again ;-)
>
> It would be nice to have description for all the work flow and how to
> use git in this case (which git commands and how) for people who are
> not familiar with git and github.
How about something like
https://github.com/kerolasa/lelux-utiliteetit/commit/bfb8a529360f4396259e24dc9d986076ebd5f091
p.s. Benno, you don't need to use github. Any internet reachable git
server should work just fine.
--
Sami Kerola
http://www.iki.fi/kerolasa/
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2015-01-06 22:51 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-29 10:16 [PATCH 02/11] docs: improve some wordings on the man page of wipefs Benno Schulenberg
2014-12-29 10:16 ` [PATCH 03/11] ipcs: in usage show resource option as nonoptional when used with -i Benno Schulenberg
2014-12-29 10:16 ` [PATCH 04/11] ipcrm: gettextize the command synopsis of the usage text Benno Schulenberg
2014-12-29 10:17 ` [PATCH 05/11] docs: restore the alternative form of setarch in its man page Benno Schulenberg
2014-12-29 10:17 ` [PATCH 06/11] setarch: make the usage synopsis comprehensible for translators Benno Schulenberg
2014-12-29 10:17 ` [PATCH 07/11] textual: list the options of setarch in a more alphabetical order Benno Schulenberg
2014-12-29 10:17 ` [PATCH 08/11] colcrt: slice up the usage text for ease of translation Benno Schulenberg
2014-12-29 10:17 ` [PATCH 09/11] look: " Benno Schulenberg
2014-12-29 10:17 ` [PATCH 10/11] tailf: " Benno Schulenberg
2014-12-29 10:17 ` [PATCH 11/11] ipc*: use customary fputs() instead of fprintf() with the usage macros Benno Schulenberg
2015-01-06 13:13 ` [PATCH 02/11] docs: improve some wordings on the man page of wipefs Karel Zak
2015-01-06 13:26 ` Sami Kerola
2015-01-06 13:30 ` Karel Zak
2015-01-06 22:51 ` Sami Kerola
2015-01-06 21:08 ` Benno Schulenberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox