small fixes to some help texts and man pages
PATCH 1/1 small fixes to some help texts and man pages
Hi,
Attached bunch of patches correct some small mistakes in some help texts and man pages, and additionally make several small improvements in wording and formatting. They also slice up some help texts into small chunks, to make things easier to handle for translators.
In the source tree there are two mount.c files: mount/mount.c and libmount/samples/mount.c. Is the latter a future replacement of the first? Or is it a version that can already be used instead of the former one? If both are valid versions, then the sixth patch should not be applied and the seventh yes. If the mount.c in libmount/ is just sample code or a future replacement, then please apply the sixth patch (although you may want to change the actual mechanism of the exclusion).
Regards,
Benno
Signature · 2 lines
http://www.fastmail.fm - Faster than the air-speed velocity of an
unladen european swallowFrom 7963665645c2c94f67c0dd5114e575bbc73b3035 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 13 Aug 2011 17:15:42 +0200
Subject: [PATCH 01/11] fsck: in usage() unmark type as optional for the -t option
Also fix "specity" typo, spell "filesystem" consistently as one word, swap the wording of one phrase, and use some semicolons for clarity.
--- fsck/fsck.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-)
fsck/fsck.c +7 -7
@@ -1215,17 +1215,17 @@ static void __attribute__((__noreturn__)) usage(void) program_invocation_short_name);puts (_ ("\nOptions:\n" -" -A check all file systems\n" -" -R skip root, useful only with -A\n" +" -A check all filesystems\n" +" -R skip root filesystem; useful only with `-A'\n" " -M do not check mounted filesystems\n" -" -t [type] specity file system types to be checked\n" -" type is allowed to be comma-separated list\n" -" -P check file systems in parallel, including root\n" +" -t type specify filesystem types to be checked;\n" +" type is allowed to be comma-separated list\n" +" -P check filesystems in parallel, including root\n" " -s serialize fsck operations\n" -" -l use flock to lock device\n" +" -l lock the device using flock()\n" " -N do not execute, just show what would be done\n" " -T do not show the title on startup\n" -" -C [fd] display progress bar, file descriptor is for GUIs\n" +" -C [fd] display progress bar; file descriptor is for GUIs\n" " -V explain what is being done\n" " -? display this help and exit\n\n" "See fsck.* commands for fs-options." ));
Signature · 1 line
1.7.0.4
From 7106f9fa136cf527d2186d0584d591ee878b875b Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 13 Aug 2011 17:53:09 +0200
Subject: [PATCH 02/11] fsck: in man page say that "options take arguments", not vice versa
Also spell "filesystem" consistently as a single word, improve some wordings here and there, and fix a few formatting and spacing issues.
--- fsck/fsck.8 | 103 ++++++++++++++++++++++++++++------------------------------ 1 files changed, 50 insertions(+), 53 deletions(-)
fsck/fsck.8 +50 -53
278 lines not on this page · raw message
Signature · 1 line
1.7.0.4
From f713493ce0219119aed2f180e4f9bf7b2233b8c1 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 13 Aug 2011 20:11:21 +0200
Subject: [PATCH 03/11] getopt: do not bundle help text lines into a single unwieldy chunk
This undoes part of commit 283f8f0256655b73071290b92c58d998e883260a. Help text lines are best gettextized separately, or in small chunks of three to five lines, which are easily managed by translators. Bundling text lines when nothing in those texts changed is discarding translators' work unnecessarily.
--- getopt/getopt.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-)
getopt/getopt.c +13 -13
@@ -313,20 +313,20 @@ static void __attribute__ ((__noreturn__)) print_help(void) {fprintf (stderr,_ ("Usage: %1$s optstring parameters\n" " %1$s [options] [--] optstring parameters\n" -" %1$s [options] -o|--options optstring [options] [--] parameters\n" -"\nOptions:\n" -" -a, --alternative Allow long options starting with single -\n" -" -h, --help This small usage guide\n" -" -l, --longoptions=longopts Long options to be recognized\n" -" -n, --name=progname The name under which errors are reported\n" -" -o, --options=optstring Short options to be recognized\n" -" -q, --quiet Disable error reporting by getopt(3)\n" -" -Q, --quiet-output No normal output\n" -" -s, --shell=shell Set shell quoting conventions\n" -" -T, --test Test for getopt(1) version\n" -" -u, --unquote Do not quote the output\n" -" -V, --version Output version information\n\n" ), +" %1$s [options] -o|--options optstring [options] [--] parameters\n" , program_invocation_short_name); +fputs (_ ("\nOptions:\n" ),stderr); +fputs (_ (" -a, --alternative Allow long options starting with single -\n" ),stderr); +fputs (_ (" -h, --help This small usage guide\n" ),stderr); +fputs (_ (" -l, --longoptions=longopts Long options to be recognized\n" ),stderr); +fputs (_ (" -n, --name=progname The name under which errors are reported\n" ),stderr); +fputs (_ (" -o, --options=optstring Short options to be recognized\n" ),stderr); +fputs (_ (" -q, --quiet Disable error reporting by getopt(3)\n" ),stderr); +fputs (_ (" -Q, --quiet-output No normal output\n" ),stderr); +fputs (_ (" -s, --shell=shell Set shell quoting conventions\n" ),stderr); +fputs (_ (" -T, --test Test for getopt(1) version\n" ),stderr); +fputs (_ (" -u, --unquote Do not quote the output\n" ),stderr); +fputs (_ (" -V, --version Output version information\n" ),stderr);exit (PARAMETER_EXIT_CODE ); }
Signature · 1 line
1.7.0.4
From e833ffd88dfe68ea1b5e3d3a4b9fba191d080e74 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 13 Aug 2011 21:02:15 +0200
Subject: [PATCH 04/11] hwclock: when cutting up help texts anyway, do it into small chunks
Also do it at sensible boundaries, improve some of the wording, and indent continuation lines for clarity. Also document -V instead of -v for --version, to conform to the majority of utilities.
--- hwclock/hwclock.c | 54 ++++++++++++++++++++++++++++------------------------ 1 files changed, 29 insertions(+), 25 deletions(-)
hwclock/hwclock.c +29 -25
77 lines not on this page · raw message
Signature · 1 line
1.7.0.4
From 8cbc1eec2557de210a51d992b79493134acf6ae8 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 13 Aug 2011 22:00:41 +0200
Subject: [PATCH 05/11] hwclock: in man page move --date and --epoch from Functions to Options
Also improve the synopsis and some wording and a bit of formatting, add the --help option, and say that --show is the default function.
--- hwclock/hwclock.8 | 118 +++++++++++++++++++++++++++++------------------------ 1 files changed, 65 insertions(+), 53 deletions(-)
hwclock/hwclock.8 +65 -53
248 lines not on this page · raw message
Signature · 1 line
1.7.0.4
From 62b1bfe5111d1c9b9d2f5eb0f6a752f900bc7eb6 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Mon, 15 Aug 2011 13:00:18 +0200
Subject: [PATCH 06/11] po: do not search /samples/ subdirectories for translatable strings
--- po/update-potfiles | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
po/update-potfiles +2 -0
@@ -5,6 +5,7 @@ # find all *.c files, # sort the list +# exclude /samples/ subdirectories # exclude ./tests/ from the list # and remove "./" prefix
@@ -13,5 +14,6 @@ find -name "*.c" | \ sort | \ + sed ':/samples/:d' | \ gawk '! /^\.\/tests\// { print gensub(/^\.\//, "", 1) }' \ > po/POTFILES.in
Signature · 1 line
1.7.0.4
From c36a17ce553478d73cfb3509bf3bc11b5cafaf20 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Mon, 15 Aug 2011 13:09:42 +0200
Subject: [PATCH 07/11] libmount: cut up mount's help text into manageable chunks
--- libmount/samples/mount.c | 41 ++++++++++++++++++++++++----------------- 1 files changed, 24 insertions(+), 17 deletions(-)
libmount/samples/mount.c +24 -17
67 lines not on this page · raw message
Signature · 1 line
1.7.0.4
From 8030c398c77fbea8d25d8bfe61a4d8a7a47738ab Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Mon, 15 Aug 2011 13:36:50 +0200
Subject: [PATCH 08/11] findmnt: improve spelling, wording and order of help text
--- misc-utils/findmnt.c | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-)
misc-utils/findmnt.c +14 -14
@@ -772,31 +772,31 @@ static void __attribute__((__noreturn__)) usage(FILE *out)"\nOptions:\n" " -s, --fstab search in static table of filesystems\n" " -m, --mtab search in table of mounted filesystems\n" -" -k, --kernel search in kernel table of mounted \n" -" filesystems (default)\n\n" +" -k, --kernel search in kernel table of mounted\n" +" filesystems (default)\n\n" " -p, --poll[=<list>] monitor changes in table of mounted filesystems\n" -" -w, --timeout <num> upper limit in millisecods which --poll will block\n\n" +" -w, --timeout <num> upper limit in milliseconds that --poll will block\n\n" +" -a, --ascii use ASCII chars for tree formatting\n" " -c, --canonicalize canonicalize printed paths\n" -" -d, --direction <word> search direction - 'forward' or 'backward'\n" -" -e, --evaluate print all TAGs (LABEL/UUID) evaluated\n" +" -d, --direction <word> direction of search, 'forward' or 'backward'\n" +" -e, --evaluate convert tags (LABEL/UUID) to device names\n" " -f, --first-only print the first found filesystem only\n" -" -h, --help print this help\n" -" -i, --invert invert sense of matching\n" +" -h, --help display this help text and exit\n" +" -i, --invert invert the sense of matching\n" " -l, --list use list format output\n" -" -n, --noheadings don't print headings\n" +" -n, --noheadings don't print column headings\n" " -u, --notruncate don't truncate text in columns\n" " -O, --options <list> limit the set of filesystems by mount options\n" -" -o, --output <list> output columns\n" +" -o, --output <list> the output columns to be shown\n" " -P, --pairs use key=\"value\" output format\n" " -r, --raw use raw output format\n" -" -a, --ascii use ascii chars for tree formatting\n" -" -t, --types <list> limit the set of filesystem by FS types\n" +" -t, --types <list> limit the set of filesystems by FS types\n" " -v, --nofsroot don't print [/dir] for bind or btrfs mounts\n" -" -R, --submounts print all submount for the matching filesystems\n" -" -S, --source <string> device, LABEL= or UUID=device\n" - " -T, --target <string> mountpoint\n\n")); +" -R, --submounts print all submounts for the matching filesystems\n" +" -S, --source <string> the device to mount (by name, LABEL= or UUID=)\n" + " -T, --target <string> the mountpoint to use\n\n"));fprintf (out,_ ("\nAvailable columns:\n" ));
Signature · 1 line
1.7.0.4
From a24233277a30792a77b7a577bc7baa7753d63615 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Mon, 15 Aug 2011 13:39:33 +0200
Subject: [PATCH 09/11] findmnt: slice up the help text into manageable chunks
--- misc-utils/findmnt.c | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-)
misc-utils/findmnt.c +11 -5
@@ -773,26 +773,32 @@ static void __attribute__((__noreturn__)) usage(FILE *out)" -s, --fstab search in static table of filesystems\n" " -m, --mtab search in table of mounted filesystems\n" " -k, --kernel search in kernel table of mounted\n" -" filesystems (default)\n\n" + " filesystems (default)\n\n")); +fprintf (out,_ (" -p, --poll[=<list>] monitor changes in table of mounted filesystems\n" -" -w, --timeout <num> upper limit in milliseconds that --poll will block\n\n" +" -w, --timeout <num> upper limit in milliseconds that --poll will block\n\n" )); +fprintf (out,_ (" -a, --ascii use ASCII chars for tree formatting\n" " -c, --canonicalize canonicalize printed paths\n" " -d, --direction <word> direction of search, 'forward' or 'backward'\n" " -e, --evaluate convert tags (LABEL/UUID) to device names\n" -" -f, --first-only print the first found filesystem only\n" +" -f, --first-only print the first found filesystem only\n" )); + +fprintf (out,_ (" -h, --help display this help text and exit\n" " -i, --invert invert the sense of matching\n" " -l, --list use list format output\n" " -n, --noheadings don't print column headings\n" -" -u, --notruncate don't truncate text in columns\n" +" -u, --notruncate don't truncate text in columns\n" )); +fprintf (out,_ (" -O, --options <list> limit the set of filesystems by mount options\n" " -o, --output <list> the output columns to be shown\n" " -P, --pairs use key=\"value\" output format\n" " -r, --raw use raw output format\n" -" -t, --types <list> limit the set of filesystems by FS types\n" +" -t, --types <list> limit the set of filesystems by FS types\n" )); + fprintf(out, _( " -v, --nofsroot don't print [/dir] for bind or btrfs mounts\n" " -R, --submounts print all submounts for the matching filesystems\n" " -S, --source <string> the device to mount (by name, LABEL= or UUID=)\n"
Signature · 1 line
1.7.0.4
From 729474d404a5dbb1c2f8f661bc4f29eb1aafbee4 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Mon, 15 Aug 2011 14:04:20 +0200
Subject: [PATCH 10/11] logger: improve, sort and slice up usage() help text
--- misc-utils/logger.c | 26 ++++++++++++++------------ 1 files changed, 14 insertions(+), 12 deletions(-)
misc-utils/logger.c +14 -12
@@ -137,22 +137,24 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out) {fprintf (out,_ ("\nUsage:\n" -" %s [options] message\n" ), +" %s [options] [message]\n" ), program_invocation_short_name);fprintf (out,_ ("\nOptions:\n" -" -i, --id log process id\n" -" -s, --stderr log message to standard error as well\n" -" -f, --file FILE log contents of the specified file\n" -" -p, --priority PRI enter message priority\n" -" -t, --tag TAG mark every line with tag\n" -" -u, --socket SOCK write to socket\n" -" -d, --udp use udp (tcp is default)\n" -" -n, --server ADDR write to remote syslog server\n" -" -P, --port define port number\n" -" -V, --version output version information and exit\n" -" -h, --help display this help and exit\n\n" )); +" -d, --udp use UDP (TCP is default)\n" +" -i, --id log the process ID too\n" +" -f, --file FILE log the contents of this file\n" +" -h, --help display this help text and exit\n" )); +fprintf (out,_ ( +" -n, --server NAME write to this remote syslog server\n" +" -P, --port NUMBER use this UDP port\n" +" -p, --priority PRIO mark given message with this priority\n" +" -s, --stderr output message to standard error as well\n" )); +fprintf (out,_ ( +" -t, --tag TAG mark every line with this tag\n" +" -u, --socket SOCKET write to this Unix socket\n" +" -V, --version output version information and exit\n\n" ));exit (out == stderr ?EXIT_FAILURE :EXIT_SUCCESS ); }
Signature · 1 line
1.7.0.4
From 64ef557cc7999cd0c61df8476e431b782135833b Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Mon, 15 Aug 2011 14:25:44 +0200
Subject: [PATCH 11/11] logger: improve descriptions on man page, sort the options, add -h and -V
--- misc-utils/logger.1 | 71 ++++++++++++++++++++++++++------------------------- 1 files changed, 36 insertions(+), 35 deletions(-)
misc-utils/logger.1 +36 -35
100 lines not on this page · raw message
Signature · 1 line
1.7.0.4
Karel Zak
maintainerQuoted 5 lines · Benno Schulenberg
Attached bunch of patches correct some small mistakes in some help texts and man pages, and additionally make several small improvements in wording and formatting. They also slice up some help texts into small chunks, to make things easier to handle for translators.
Good idea. Thanks.
Quoted 8 lines
In the source tree there are two
mount.cfiles:mount/mount.candlibmount/samples/mount.c. Is the latter a future replacement of the first? Or is it a version that can already be used instead of the former one? If both are valid versions, then the sixth patch should not be applied and the seventh yes. If themount.cin libmount/ is just sample code or a future replacement, then please apply the sixth patch (although you may want to change the actual mechanism of the exclusion).
All applied :-) The libmount/sample/mount.c is a future replacement. It's good idea to ignore */samples/* directories.
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com