util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] zramctl: fix the wording of some message strings
@ 2014-08-01 12:19 Benno Schulenberg
  2014-08-01 12:19 ` [PATCH 2/2] docs: improve the wording and formatting of the zramctl man page Benno Schulenberg
  2014-08-05 13:42 ` [PATCH 1/2] zramctl: fix the wording of some message strings Karel Zak
  0 siblings, 2 replies; 4+ messages in thread
From: Benno Schulenberg @ 2014-08-01 12:19 UTC (permalink / raw)
  To: util-linux

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
 sys-utils/zramctl.c |   25 ++++++++++++-------------
 1 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/sys-utils/zramctl.c b/sys-utils/zramctl.c
index 2215898..a26cd8e 100644
--- a/sys-utils/zramctl.c
+++ b/sys-utils/zramctl.c
@@ -1,5 +1,5 @@
 /*
- * zramctl - purpose of it
+ * zramctl - control compressed block devices in RAM
  *
  * Copyright (c) 2014 Timofey Titovets <Nefelim4ag@gmail.com>
  * Copyright (C) 2014 Karel Zak <kzak@redhat.com>
@@ -65,15 +65,14 @@ enum {
 
 static const struct colinfo infos[] = {
 	[COL_NAME]      = { "NAME",      0.25, 0, N_("zram device name") },
-	[COL_DISKSIZE]  = { "DISKSIZE",     5, SCOLS_FL_RIGHT, N_("limit on the uncompressed worth of data") },
+	[COL_DISKSIZE]  = { "DISKSIZE",     5, SCOLS_FL_RIGHT, N_("limit on the uncompressed amount of data") },
 	[COL_ORIG_SIZE] = { "DATA",         5, SCOLS_FL_RIGHT, N_("uncompressed size of stored data") },
 	[COL_COMP_SIZE] = { "COMPR",        5, SCOLS_FL_RIGHT, N_("compressed size of stored data") },
-	[COL_ALGORITHM] = { "ALGORITHM",    3, 0, N_("selected compression algorithms") },
+	[COL_ALGORITHM] = { "ALGORITHM",    3, 0, N_("the selected compression algorithm") },
 	[COL_STREAMS]   = { "STREAMS",      3, SCOLS_FL_RIGHT, N_("number of concurrent compress operations") },
 	[COL_ZEROPAGES] = { "ZERO-PAGES",   3, SCOLS_FL_RIGHT, N_("empty pages with no allocated memory") },
 	[COL_MEMTOTAL]  = { "TOTAL",        5, SCOLS_FL_RIGHT, N_("all memory including allocator fragmentation and metadata overhead") },
 	[COL_MOUNTPOINT]= { "MOUNTPOINT",0.10, SCOLS_FL_TRUNC, N_("where the device is mounted") },
-
 };
 
 static int columns[ARRAY_SIZE(infos) * 2] = {-1};
@@ -366,19 +365,19 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
 
 	fputs(USAGE_HEADER, out);
 	fprintf(out, _(	" %1$s [options] <device>\n"
-			" %1$s -r <device> [...]\n" 
+			" %1$s -r <device> [...]\n"
 			" %1$s [options] -f | <device> -s <size>\n"),
 			program_invocation_short_name);
 
 	fputs(USAGE_OPTIONS, out);
-	fputs(_(" -a, --algorithm <lzo|lz4> compression algorithm\n"), out);
+	fputs(_(" -a, --algorithm lzo|lz4   compression algorithm to use\n"), out);
 	fputs(_(" -b, --bytes               print sizes in bytes rather than in human readable format\n"), out);
-	fputs(_(" -f, --find                find free device\n"), out);
+	fputs(_(" -f, --find                find a free device\n"), out);
 	fputs(_(" -n, --noheadings          don't print headings\n"), out);
 	fputs(_(" -o, --output <list>       columns to use for status output\n"), out);
+	fputs(_("     --raw                 use raw status output format\n"), out);
 	fputs(_(" -r, --reset               reset all specified devices\n"), out);
 	fputs(_(" -s, --size <size>         device size\n"), out);
-	fputs(_("     --raw                 use raw status output format\n"), out);
 	fputs(_(" -t, --streams <number>    number of compressoin streams\n\n"), out);
 
 	fputs(USAGE_SEPARATOR, out);
@@ -413,9 +412,9 @@ int main(int argc, char **argv)
 
 	static const struct option longopts[] = {
 		{ "algorithm", required_argument, NULL, 'a' },
+		{ "bytes",     no_argument, NULL, 'b' },
 		{ "find",      no_argument, NULL, 'f' },
 		{ "help",      no_argument, NULL, 'h' },
-		{ "bytes",     no_argument, NULL, 'b' },
 		{ "output",    required_argument, NULL, 'o' },
 		{ "noheadings",no_argument, NULL, 'n' },
 		{ "reset",     no_argument, NULL, 'r' },
@@ -490,7 +489,7 @@ int main(int argc, char **argv)
 
 	if (find && optind < argc)
 		errx(EXIT_FAILURE, _("option --find is mutually exclusive "
-				     "with <device>."));
+				     "with <device>"));
 	if (act == A_NONE)
 		act = find ? A_FINDONLY : A_STATUS;
 
@@ -501,7 +500,7 @@ int main(int argc, char **argv)
 	case A_STATUS:
 		if (algorithm || find || nstreams)
 			errx(EXIT_FAILURE, _("options --algorithm, --find and "
-					"--streams are mutually exclusive."));
+					"--streams are mutually exclusive"));
 		if (!ncolumns) {		/* default columns */
 			columns[ncolumns++] = COL_NAME;
 			columns[ncolumns++] = COL_ALGORITHM;
@@ -533,7 +532,7 @@ int main(int argc, char **argv)
 	case A_FINDONLY:
 		zram = find_free_zram();
 		if (!zram)
-			errx(EXIT_FAILURE, _("no found free zram device"));
+			errx(EXIT_FAILURE, _("no free zram device found"));
 		printf("%s\n", zram->devname);
 		free_zram(zram);
 		break;
@@ -541,7 +540,7 @@ int main(int argc, char **argv)
 		if (find) {
 			zram = find_free_zram();
 			if (!zram)
-				errx(EXIT_FAILURE, _("no found free zram device"));
+				errx(EXIT_FAILURE, _("no free zram device found"));
 		} else if (optind == argc)
 			errx(EXIT_FAILURE, _("no device specified"));
 		else
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] docs: improve the wording and formatting of the zramctl man page
  2014-08-01 12:19 [PATCH 1/2] zramctl: fix the wording of some message strings Benno Schulenberg
@ 2014-08-01 12:19 ` Benno Schulenberg
  2014-08-05 13:42   ` Karel Zak
  2014-08-05 13:42 ` [PATCH 1/2] zramctl: fix the wording of some message strings Karel Zak
  1 sibling, 1 reply; 4+ messages in thread
From: Benno Schulenberg @ 2014-08-01 12:19 UTC (permalink / raw)
  To: util-linux

Especially fix the mistaken short option -h for --noheadings.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
 sys-utils/zramctl.8 |   61 ++++++++++++++++++++++++++++++---------------------
 1 files changed, 36 insertions(+), 25 deletions(-)

diff --git a/sys-utils/zramctl.8 b/sys-utils/zramctl.8
index 34bb71f..74240a1 100644
--- a/sys-utils/zramctl.8
+++ b/sys-utils/zramctl.8
@@ -22,20 +22,19 @@ Print name of first unused zram device:
 .B "zramctl \-f"
 .sp
 .in -5
-Setup zram device:
+Set up a zram device:
 .sp
 .in +5
 .B zramctl
 .RB [ \-f " | "\fIzramdev\fP ]
 .RB [ \-s
 .IR size ]
-.RB \ [ \-t
+.RB [ \-t
 .IR number ]
-.in +8
 .RB [ \-a
 .IR algorithm ]
 .sp
-.in -13
+.in -5
 .ad b
 .SH DESCRIPTION
 .B zramctl
@@ -44,35 +43,47 @@ query the status of used zram devices.  If no option is given, all zram devices
 are shown.
 
 .SH OPTIONS
-.IP "\fB\-a, \-\-algorithm \fI{lzo|lz4}\fP"
-Set compression algorithm used for compress data in zram device.
-.IP "\fB\-f, \-\-find\fP"
-Find the first unused zram device. If a \fB--size\fR argument is present, then
+.TP
+.BR \-a , " \-\-algorithm lzo" | lz4
+Set the compression algorithm to be used for compressing data in the zram device.
+.TP
+.BR \-f , " \-\-find"
+Find the first unused zram device.  If a \fB--size\fR argument is present, then
 initialize the device.
-.IP "\fB\-h, \-\-help\fP"
-print help
-.IP "\fB\-h, \-\-noheadings\fP"
+.TP
+.BR \-n , " \-\-noheadings"
 Do not print a header line in status output.
-.IP "\fB\-o, \-\-output \fIlist\fP"
-Define the status output columns to use.  If no output arrangement is specified,
-then a default set is used.
+.TP
+.BR \-o , " \-\-output " \fIlist
+Define the status output columns to be used.  If no output arrangement is
+specified, then a default set is used.
 Use \fB\-\-help\fP to get a list of all supported columns.
-.IP "\fB\-r, \-\-reset\fP
-Reset options specified zram device(s). Zram device setting can be changed only
-after reset.
-.IP "\fB\-\-raw\fP"
+.TP
+.B \-\-raw
 Use the raw format for status output.
-.IP "\fB\-s, \-\-size\fP \fIsize\fP
-Force zram driver to reread size of the file associated with the specified zram device
+.TP
+.BR \-r , " \-\-reset"
+Reset the options of the specified zram device(s).  Zram device settings
+can be changed only after a reset.
+.TP
+.BR \-s , " \-\-size " \fIsize
+Force the zram driver to reread the size of the file associated with
+the specified zram device
 
 The \fIsize\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
 KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.
-.IP "\fB\-t, \-\-streams \fInumber\fP"
-Set number of maximum compress streams what used for device. The default is one stream.
-.IP "\fB\-V, \-\-version\fP"
+.TP
+.BR \-t , " \-\-streams " \fInumber
+Set the maximum number of compression streams that can be used for the device.
+The default is one stream.
+.TP
+.BR \-V , " \-\-version"
 Display version information and exit.
+.TP
+.BR \-h , " \-\-help"
+Display help text and exit.
 
 .SH RETURN VALUE
 .B zramctl
@@ -84,8 +95,8 @@ returns 0 on success, nonzero on failure.
 zram block devices
 
 .SH EXAMPLE
-The following commands can be used for setup the zram device with gigabyte size
- and using as swap device.
+The following commands set up a zram device with a size of one gigabyte
+and use it as swap device.
 .nf
 .IP
 # zramctl --find --size 1024M
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] zramctl: fix the wording of some message strings
  2014-08-01 12:19 [PATCH 1/2] zramctl: fix the wording of some message strings Benno Schulenberg
  2014-08-01 12:19 ` [PATCH 2/2] docs: improve the wording and formatting of the zramctl man page Benno Schulenberg
@ 2014-08-05 13:42 ` Karel Zak
  1 sibling, 0 replies; 4+ messages in thread
From: Karel Zak @ 2014-08-05 13:42 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: util-linux

On Fri, Aug 01, 2014 at 02:19:07PM +0200, Benno Schulenberg wrote:
>  sys-utils/zramctl.c |   25 ++++++++++++-------------
>  1 files changed, 12 insertions(+), 13 deletions(-)

 Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] docs: improve the wording and formatting of the zramctl man page
  2014-08-01 12:19 ` [PATCH 2/2] docs: improve the wording and formatting of the zramctl man page Benno Schulenberg
@ 2014-08-05 13:42   ` Karel Zak
  0 siblings, 0 replies; 4+ messages in thread
From: Karel Zak @ 2014-08-05 13:42 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: util-linux

On Fri, Aug 01, 2014 at 02:19:08PM +0200, Benno Schulenberg wrote:
>  sys-utils/zramctl.8 |   61 ++++++++++++++++++++++++++++++---------------------
>  1 files changed, 36 insertions(+), 25 deletions(-)

 Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-05 13:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-01 12:19 [PATCH 1/2] zramctl: fix the wording of some message strings Benno Schulenberg
2014-08-01 12:19 ` [PATCH 2/2] docs: improve the wording and formatting of the zramctl man page Benno Schulenberg
2014-08-05 13:42   ` Karel Zak
2014-08-05 13:42 ` [PATCH 1/2] zramctl: fix the wording of some message strings Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).