From: "Benno Schulenberg" <bensberg@justemail.net>
To: "Util-Linux" <util-linux@vger.kernel.org>
Subject: [patches] small fixes to some messages and man pages, and some questions
Date: Thu, 11 Aug 2011 22:22:07 +0200 [thread overview]
Message-ID: <1313094127.6807.140258128661629@webmail.messagingengine.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1780 bytes --]
Hi,
Attached bunch of patches improve or correct several error messages
or usage synopses.
About the fourth patch I'm unsure. The current description of the option
'--no-reread' is "skip partition re-read at boot". With "boot" is meant
"program startup", so that needs to be corrected. But the real effect of
--no-reread seems to be to just check that the relevant partition is not
in use. Is that correct?
By the way, I don't understand why the options -g (--show-geometry) and
-G (show-pt-geometry) are listed under "Dangerous options". How can
they be dangerous when they just show things?
Also I do not understand the descriptions of the new options --nested,
--chained, and --onesector. How is "disjoint" different from "mutually
disjoint"? Would the following attempts at description be correct?
--nested each logical and extended partition falls within an extended one
--chained each logical partition falls within an extended one
--onesector not any partition falls within another
The two new options --inside-outer and --not-inside-outer have been
misdocumented as --inside-order and --not-inside-order. The last and
seventeenth patch fixes that.
The fourteenth patch adds the missing "[options]" to the usage synopsis
of scriptreplay, and also indicates the timingfile argument as optional.
However, I find this a bit misleading: the timingfile is only optional when
it is specified via the -t option. Wouldn't it be better to describe the
command with two alternative synopses, as follows?
Usage: scriptreplay timingfile [typescript [divisor]]
or: scriptreplay [options] [timingfile] [typescript] [divisor]
Regards,
Benno
--
http://www.fastmail.fm - Accessible with your email software
or over the web
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-mkfs.cramfs-clearer-error-message-cannot-close-inste.patch --]
[-- Type: text/x-patch; name="0001-mkfs.cramfs-clearer-error-message-cannot-close-inste.patch", Size: 990 bytes --]
From 8675f4f28e656a3d754a569afd0a732f786fa572 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 10 Aug 2011 20:55:48 +0200
Subject: [PATCH 01/17] mkfs.cramfs: clearer error message, "cannot close" instead of "closing"
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
disk-utils/mkfs.cramfs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c
index 9bb9153..5193634 100644
--- a/disk-utils/mkfs.cramfs.c
+++ b/disk-utils/mkfs.cramfs.c
@@ -665,7 +665,7 @@ static unsigned int write_file(char *file, char *base, unsigned int offset)
memcpy(base + offset, buf, image_length);
munmap(buf, image_length);
if (close (fd) < 0)
- err(MKFS_ERROR, _("closing file %s"), file);
+ err(MKFS_ERROR, _("cannot close file %s"), file);
/* Pad up the image_length to a 4-byte boundary */
while (image_length & 3) {
*(base + offset + image_length) = '\0';
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-fdisksgilabel-correct-the-grammar-of-an-error-messag.patch --]
[-- Type: text/x-patch; name="0002-fdisksgilabel-correct-the-grammar-of-an-error-messag.patch", Size: 894 bytes --]
From fb2664acf48c1c4c278caabade80f75ddd3ea467 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 10 Aug 2011 20:57:07 +0200
Subject: [PATCH 02/17] fdisksgilabel: correct the grammar of an error message
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
fdisk/fdisksgilabel.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fdisk/fdisksgilabel.c b/fdisk/fdisksgilabel.c
index cc95598..8179bc1 100644
--- a/fdisk/fdisksgilabel.c
+++ b/fdisk/fdisksgilabel.c
@@ -533,7 +533,7 @@ int
sgi_change_sysid(int i, int sys)
{
if (sgi_get_num_sectors(i) == 0) /* caught already before, ... */ {
- printf(_("Sorry You may change the Tag of non-empty partitions.\n"));
+ printf(_("Sorry, only for non-empty partitions you can change the tag.\n"));
return 0;
}
if (((sys != ENTIRE_DISK) && (sys != SGI_VOLHDR))
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-sfdisk-gettextize-each-warning-as-a-whole.patch --]
[-- Type: text/x-patch; name="0003-sfdisk-gettextize-each-warning-as-a-whole.patch", Size: 1332 bytes --]
From aec94f1a8a9c2ae333f2659d283ad8f355869d01 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 10 Aug 2011 20:58:49 +0200
Subject: [PATCH 03/17] sfdisk: gettextize each warning as a whole
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
fdisk/sfdisk.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c
index 6cd85a2..6ae0be4 100644
--- a/fdisk/sfdisk.c
+++ b/fdisk/sfdisk.c
@@ -1243,8 +1243,8 @@ partitions_ok(struct disk_desc *z) {
q = p->ep;
if (p->start < q->start
|| p->start + p->size > q->start + q->size) {
- my_warn(_("Warning: partition %s "), PNO(p));
- my_warn(_("is not contained in partition %s\n"), PNO(q));
+ my_warn(_("Warning: partition %s is not contained in "
+ "partition %s\n"), PNO(p), PNO(q));
return 0;
}
}
@@ -1255,8 +1255,8 @@ partitions_ok(struct disk_desc *z) {
for (q = p + 1; q < partitions + partno; q++)
if (q->size && !is_extended(q->p.sys_type))
if (!((p->start > q->start) ? disj(q, p) : disj(p, q))) {
- my_warn(_("Warning: partitions %s "), PNO(p));
- my_warn(_("and %s overlap\n"), PNO(q));
+ my_warn(_("Warning: partitions %s and %s overlap\n"),
+ PNO(p), PNO(q));
return 0;
}
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0004-sfdisk-improve-descriptions-of-options-no-reread-and.patch --]
[-- Type: text/x-patch; name="0004-sfdisk-improve-descriptions-of-options-no-reread-and.patch", Size: 1747 bytes --]
From 2f124ce033ced627e121522b07795e610b0c5b9d Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 10 Aug 2011 20:59:49 +0200
Subject: [PATCH 04/17] sfdisk: improve descriptions of options --no-reread and --show-extended
Also keep the two geometry options (-g and -G) together by moving -A.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
fdisk/sfdisk.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c
index 6ae0be4..b01723d 100644
--- a/fdisk/sfdisk.c
+++ b/fdisk/sfdisk.c
@@ -2378,13 +2378,13 @@ usage(FILE * out) {
fprintf(out, _("\nDangerous options:\n"
" -f, --force disable all consistency checking\n"
+ " --no-reread do not check whether the partition is in use\n"
" -g, --show-geometry print the kernel's idea of the geometry\n"
- " -A, --activate[=device] activate bootable flag\n"
" -G, --show-pt-geometry print geometry guessed from the partition table\n"
+ " -A, --activate[=device] activate bootable flag\n"
" -U, --unhide[=device] set partition unhidden\n"
- " --no-reread skip partition re-read at boot\n"
- " -x, --show-extended also list extended partitions on output\n"
- " or expect descriptors for them on input\n"
+ " -x, --show-extended also list extended partitions in the output,\n"
+ " or expect descriptors for them in the input\n"
" --leave-last do not allocate the last cylinder\n"
" --IBM same as --leave-last\n"
" --in-order partitions are in order\n"
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #6: 0005-sfdisk-remove-inconsistent-and-wasteful-newlines-in-.patch --]
[-- Type: text/x-patch; name="0005-sfdisk-remove-inconsistent-and-wasteful-newlines-in-.patch", Size: 11969 bytes --]
From e2bac4d95b0d6da74215337a6211e1312ad771e7 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 10 Aug 2011 21:02:10 +0200
Subject: [PATCH 05/17] sfdisk: remove inconsistent and wasteful newlines in the _() calls
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
fdisk/sfdisk.c | 113 +++++++++++++++++++++----------------------------------
1 files changed, 43 insertions(+), 70 deletions(-)
diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c
index b01723d..cd494d0 100644
--- a/fdisk/sfdisk.c
+++ b/fdisk/sfdisk.c
@@ -489,10 +489,9 @@ get_cylindersize(char *dev, int fd, int silent) {
B.cylinders = B.total_size / B.cylindersize;
if (R.start && !force) {
- my_warn(_
- ("Warning: start=%lu - this looks like a partition rather than\n"
- "the entire disk. Using fdisk on it is probably meaningless.\n"
- "[Use the --force option if you really want this]\n"),
+ my_warn(_("Warning: start=%lu - this looks like a partition rather than\n"
+ "the entire disk. Using fdisk on it is probably meaningless.\n"
+ "[Use the --force option if you really want this]\n"),
R.start);
exit(1);
}
@@ -505,15 +504,13 @@ get_cylindersize(char *dev, int fd, int silent) {
R.sectors);
if (R.cylinders && B.cylinders != R.cylinders
&& B.cylinders < 65536 && R.cylinders < 65536)
- my_warn(_
- ("Warning: BLKGETSIZE/HDIO_GETGEO says that there are %lu cylinders\n"),
+ my_warn(_("Warning: BLKGETSIZE/HDIO_GETGEO says that there are %lu cylinders\n"),
R.cylinders);
#endif
if (B.sectors > 63)
- my_warn(_
- ("Warning: unlikely number of sectors (%lu) - usually at most 63\n"
- "This will give problems with all software that uses C/H/S addressing.\n"),
+ my_warn(_("Warning: unlikely number of sectors (%lu) - usually at most 63\n"
+ "This will give problems with all software that uses C/H/S addressing.\n"),
B.sectors);
if (!silent)
printf(_("\nDisk %s: %lu cylinders, %lu heads, %lu sectors/track\n"),
@@ -960,8 +957,7 @@ out_partition_header(char *dev, int format, struct geometry G) {
if (G.cylindersize) {
printf(_("Units = cylinders of %lu bytes, blocks of 1024 bytes"
", counting from %d\n\n"), G.cylindersize << 9, increment);
- printf(_
- (" Device Boot Start End #cyls #blocks Id System\n"));
+ printf(_(" Device Boot Start End #cyls #blocks Id System\n"));
break;
}
/* fall through */
@@ -978,8 +974,7 @@ out_partition_header(char *dev, int format, struct geometry G) {
case F_MEGABYTE:
printf(_("Units = mebibytes of 1048576 bytes, blocks of 1024 bytes"
", counting from %d\n\n"), increment);
- printf(_
- (" Device Boot Start End MiB #blocks Id System\n"));
+ printf(_(" Device Boot Start End MiB #blocks Id System\n"));
break;
}
}
@@ -1138,20 +1133,17 @@ out_partition(char *dev, int format, struct part_desc *p,
aa = chs_to_longchs(a);
bb = chs_to_longchs(b);
if (a.s && !is_equal_chs(a, b))
- do_warn(_
- ("\t\tstart: (c,h,s) expected (%ld,%ld,%ld) found (%ld,%ld,%ld)\n"),
+ do_warn(_("\t\tstart: (c,h,s) expected (%ld,%ld,%ld) found (%ld,%ld,%ld)\n"),
aa.c, aa.h, aa.s, bb.c, bb.h, bb.s);
a = (size ? ulong_to_chs(end, G) : zero_chs);
b = p->p.end_chs;
aa = chs_to_longchs(a);
bb = chs_to_longchs(b);
if (a.s && !is_equal_chs(a, b))
- do_warn(_
- ("\t\tend: (c,h,s) expected (%ld,%ld,%ld) found (%ld,%ld,%ld)\n"),
+ do_warn(_("\t\tend: (c,h,s) expected (%ld,%ld,%ld) found (%ld,%ld,%ld)\n"),
aa.c, aa.h, aa.s, bb.c, bb.h, bb.s);
if (G.cylinders && G.cylinders < 1024 && bb.c > G.cylinders)
- do_warn(_
- ("partition ends on cylinder %ld, beyond the end of the disk\n"),
+ do_warn(_("partition ends on cylinder %ld, beyond the end of the disk\n"),
bb.c);
}
}
@@ -1223,15 +1215,13 @@ partitions_ok(struct disk_desc *z) {
for (p = partitions; p - partitions < partno; p++)
if (p->size == 0) {
if (p->p.sys_type != EMPTY_PARTITION)
- my_warn(_
- ("Warning: partition %s has size 0 but is not marked Empty\n"),
+ my_warn(_("Warning: partition %s has size 0 but is not marked Empty\n"),
PNO(p));
else if (p->p.bootable != 0)
my_warn(_("Warning: partition %s has size 0 and is bootable\n"),
PNO(p));
else if (p->p.start_sect != 0)
- my_warn(_
- ("Warning: partition %s has size 0 and nonzero start\n"),
+ my_warn(_("Warning: partition %s has size 0 and nonzero start\n"),
PNO(p));
/* all this is probably harmless, no error return */
}
@@ -1285,8 +1275,7 @@ partitions_ok(struct disk_desc *z) {
return 0;
}
if (p->size && p->start + p->size > ds) {
- my_warn(_
- ("Warning: partition %s extends past end of disk\n"),
+ my_warn(_("Warning: partition %s extends past end of disk\n"),
PNO(p));
return 0;
}
@@ -1302,9 +1291,8 @@ partitions_ok(struct disk_desc *z) {
if (p->p.sys_type == EXTENDED_PARTITION)
ect++;
if (ect > 1 && !Linux) {
- my_warn(_
- ("Among the primary partitions, at most one can be extended\n"
- " (although this is not a problem under Linux)\n"));
+ my_warn(_("Among the primary partitions, at most one can be extended\n"
+ " (although this is not a problem under Linux)\n"));
return 0;
}
}
@@ -1348,25 +1336,22 @@ partitions_ok(struct disk_desc *z) {
if (pno == -1)
pno = p - partitions;
else if (p - partitions < 4) {
- my_warn(_
- ("Warning: more than one primary partition is marked "
- "bootable (active)\n"
- "This does not matter for LILO, but the DOS MBR will "
- "not boot this disk.\n"));
+ my_warn(_("Warning: more than one primary partition is marked "
+ "bootable (active)\n"
+ "This does not matter for LILO, but the DOS MBR will "
+ "not boot this disk.\n"));
break;
}
if (p - partitions >= 4) {
- my_warn(_
- ("Warning: usually one can boot from primary partitions "
- "only\nLILO disregards the `bootable' flag.\n"));
+ my_warn(_("Warning: usually one can boot from primary partitions "
+ "only\nLILO disregards the `bootable' flag.\n"));
break;
}
}
if (pno == -1 || pno >= 4)
- my_warn(_
- ("Warning: no primary partition is marked bootable (active)\n"
- "This does not matter for LILO, but the DOS MBR will "
- "not boot this disk.\n"));
+ my_warn(_("Warning: no primary partition is marked bootable (active)\n"
+ "This does not matter for LILO, but the DOS MBR will "
+ "not boot this disk.\n"));
}
/* Is chs as we expect? */
@@ -1381,8 +1366,7 @@ partitions_ok(struct disk_desc *z) {
if (!chs_ok(b, PNO(p), _("start")))
return 0;
if (a.s && !is_equal_chs(a, b))
- my_warn(_
- ("partition %s: start: (c,h,s) expected (%ld,%ld,%ld) found (%ld,%ld,%ld)\n"),
+ my_warn(_("partition %s: start: (c,h,s) expected (%ld,%ld,%ld) found (%ld,%ld,%ld)\n"),
PNO(p), aa.c, aa.h, aa.s, bb.c, bb.h, bb.s);
a = p->size ? ulong_to_chs(p->start + p->size - 1, B) : zero_chs;
b = p->p.end_chs;
@@ -1391,12 +1375,10 @@ partitions_ok(struct disk_desc *z) {
if (!chs_ok(b, PNO(p), _("end")))
return 0;
if (a.s && !is_equal_chs(a, b))
- my_warn(_
- ("partition %s: end: (c,h,s) expected (%ld,%ld,%ld) found (%ld,%ld,%ld)\n"),
+ my_warn(_("partition %s: end: (c,h,s) expected (%ld,%ld,%ld) found (%ld,%ld,%ld)\n"),
PNO(p), aa.c, aa.h, aa.s, bb.c, bb.h, bb.s);
if (B.cylinders && B.cylinders < 1024 && bb.c > B.cylinders)
- my_warn(_
- ("partition %s ends on cylinder %ld, beyond the end of the disk\n"),
+ my_warn(_("partition %s ends on cylinder %ld, beyond the end of the disk\n"),
PNO(p), bb.c);
}
@@ -1816,8 +1798,7 @@ read_stdin(char **fields, char *line, int fieldssize, int linesize) {
if (*ip == 0)
return fno;
if (*ip != ',' && *ip != ';')
- fatal(_
- ("input error: unexpected character %c after %s field\n"),
+ fatal(_("input error: unexpected character %c after %s field\n"),
*ip, d->fldname);
*ip = 0;
goto nxtfld;
@@ -2163,8 +2144,7 @@ read_line(int pno, struct part_desc *ep, char *dev, int interactive,
p.size -= (p.size % unitsize(format));
}
if (p.size > ml1) {
- my_warn(_
- ("Warning: given size (%lu) exceeds max allowable size (%lu)\n"),
+ my_warn(_("Warning: given size (%lu) exceeds max allowable size (%lu)\n"),
(p.size + unitsize(0) - 1) / unitsize(0), ml1 / unitsize(0));
if (!force)
return 0;
@@ -2327,10 +2307,9 @@ read_input(char *dev, int interactive, struct disk_desc *z) {
z->partno = 0;
if (interactive)
- my_warn(_
- ("Input in the following format; absent fields get a default value.\n"
- "<start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s>\n"
- "Usually you only need to specify <start> and <size> (and perhaps <type>).\n"));
+ my_warn(_("Input in the following format; absent fields get a default value.\n"
+ "<start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s>\n"
+ "Usually you only need to specify <start> and <size> (and perhaps <type>).\n"));
eof = 0;
for (i = 0; i < 4; i++)
@@ -2408,11 +2387,9 @@ static void
activate_usage(char *progn) {
puts(_("Usage:"));
printf(_("%s device list active partitions on device\n"), progn);
- printf(_
- ("%s device n1 n2 ... activate partitions n1 ..., inactivate the rest\n"),
+ printf(_("%s device n1 n2 ... activate partitions n1 ..., inactivate the rest\n"),
progn);
- printf(_
- ("%s -An device activate partition n, inactivate the other ones\n"),
+ printf(_("%s -An device activate partition n, inactivate the other ones\n"),
PROGNAME);
exit(1);
}
@@ -3040,8 +3017,7 @@ do_activate(char **av, int ac, char *arg) {
if (z->partitions[pno].p.bootable)
i++;
if (i != 1)
- my_warn(_
- ("You have %d active primary partitions. This does not matter for LILO,\n"
+ my_warn(_("You have %d active primary partitions. This does not matter for LILO,\n"
"but the DOS MBR will only boot a disk with 1 active partition.\n"),
i);
@@ -3167,10 +3143,9 @@ do_fdisk(char *dev) {
if (!no_write && !no_reread) {
my_warn(_("Checking that no-one is using this disk right now ...\n"));
if (reread_ioctl(fd)) {
- do_warn(_
- ("\nThis disk is currently in use - repartitioning is probably a bad idea.\n"
- "Umount all file systems, and swapoff all swap partitions on this disk.\n"
- "Use the --no-reread flag to suppress this check.\n"));
+ do_warn(_("\nThis disk is currently in use - repartitioning is probably a bad idea.\n"
+ "Umount all file systems, and swapoff all swap partitions on this disk.\n"
+ "Use the --no-reread flag to suppress this check.\n"));
if (!force) {
do_warn(_("Use the --force flag to overrule all checks.\n"));
exit(1);
@@ -3205,8 +3180,7 @@ do_fdisk(char *dev) {
fatal(_("I don't like these partitions - nothing changed.\n"
"(If you really want this, use the --force option.)\n"));
else
- do_warn(_
- ("I don't like this - probably you should answer No\n"));
+ do_warn(_("I don't like this - probably you should answer No\n"));
}
ask:
if (interactive) {
@@ -3241,10 +3215,9 @@ do_fdisk(char *dev) {
if (!reread_disk_partition(dev, fd))
exit_status = 1;
- my_warn(_
- ("If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)\n"
- "to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1\n"
- "(See fdisk(8).)\n"));
+ my_warn(_("If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)\n"
+ "to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1\n"
+ "(See fdisk(8).)\n"));
sync(); /* superstition */
exit(exit_status);
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #7: 0006-ul-in-usage-not-overwriting-but-overriding-is-meant.patch --]
[-- Type: text/x-patch; name="0006-ul-in-usage-not-overwriting-but-overriding-is-meant.patch", Size: 1060 bytes --]
From 5776dd6bcb05f4e2a666608ac2608cf123c3c15f Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 10 Aug 2011 21:04:42 +0200
Subject: [PATCH 06/17] ul: in usage() not overwriting but overriding is meant
Also always use lowercase.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
text-utils/ul.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/text-utils/ul.c b/text-utils/ul.c
index 1cbacfc..9e08bc1 100644
--- a/text-utils/ul.c
+++ b/text-utils/ul.c
@@ -137,8 +137,8 @@ usage(FILE *out)
fprintf(out, _(
"\nOptions:\n"
- " -t, --terminal TERMINAL overwrite TERM environment variable\n"
- " -i, --indicated Underlining is indicated by a separate line\n"
+ " -t, --terminal TERMINAL override the TERM environment variable\n"
+ " -i, --indicated underlining is indicated via a separate line\n"
" -V, --version output version information and exit\n"
" -h, --help display this help and exit\n\n"));
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #8: 0007-ul-make-usage-say-that-more-than-one-input-file-is-a.patch --]
[-- Type: text/x-patch; name="0007-ul-make-usage-say-that-more-than-one-input-file-is-a.patch", Size: 757 bytes --]
From 88f0d378e8ed1474bce2a16f0b7269576dc6a66e Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 10 Aug 2011 21:06:07 +0200
Subject: [PATCH 07/17] ul: make usage() say that more than one input file is allowed
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
text-utils/ul.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/text-utils/ul.c b/text-utils/ul.c
index 9e08bc1..a52000b 100644
--- a/text-utils/ul.c
+++ b/text-utils/ul.c
@@ -133,7 +133,7 @@ usage(FILE *out)
{
fprintf(out, _(
"\nUsage:\n"
- " %s [options] [file]\n"), program_invocation_short_name);
+ " %s [options] [file...]\n"), program_invocation_short_name);
fprintf(out, _(
"\nOptions:\n"
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #9: 0008-ul-add-h-and-V-to-the-man-page-use-file-and-lowercas.patch --]
[-- Type: text/x-patch; name="0008-ul-add-h-and-V-to-the-man-page-use-file-and-lowercas.patch", Size: 1486 bytes --]
From fd4c3ccf8b3b9ca9b6f134fb297e5fe90e3a78c0 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 10 Aug 2011 21:07:13 +0200
Subject: [PATCH 08/17] ul: add -h and -V to the man page; use "file" and lowercase
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
text-utils/ul.1 | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/text-utils/ul.1 b/text-utils/ul.1
index 7d4e57a..7992d72 100644
--- a/text-utils/ul.1
+++ b/text-utils/ul.1
@@ -39,11 +39,11 @@
.Nd do underlining
.Sh SYNOPSIS
.Nm ul
-.Op Fl i
+.Op Fl hiV
.Op Fl t Ar terminal
-.Op Ar name Ar ...
+.Op Ar file Ar ...
.Sh DESCRIPTION
-.Nm Ul
+.Nm ul
reads the named files (or standard input if none are given)
and translates occurrences of underscores to the sequence
which indicates underlining for the terminal in use, as specified
@@ -63,6 +63,8 @@ If the terminal cannot underline, underlining is ignored.
.Pp
The following options are available:
.Bl -tag -width Ds
+.It Fl h
+Display a help text and exit.
.It Fl i
Underlining is indicated by a separate line containing appropriate
dashes `\-'; this is useful when you want to look at the underlining
@@ -72,6 +74,8 @@ output stream on a crt-terminal.
.It Fl t Ar terminal
Overrides the terminal type specified in the environment with
.Ar terminal .
+.It Fl V
+Display version information and exit.
.El
.Sh ENVIRONMENT
The following environment variable is used:
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #10: 0009-ul-remove-superfluous-return-as-usage-does-not-retur.patch --]
[-- Type: text/x-patch; name="0009-ul-remove-superfluous-return-as-usage-does-not-retur.patch", Size: 873 bytes --]
From db67b9c1332a703b7071c2ff02db41b0e91819ef Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 10 Aug 2011 21:10:29 +0200
Subject: [PATCH 09/17] ul: remove superfluous return as usage() does not return
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
text-utils/ul.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/text-utils/ul.c b/text-utils/ul.c
index a52000b..6132166 100644
--- a/text-utils/ul.c
+++ b/text-utils/ul.c
@@ -192,12 +192,11 @@ int main(int argc, char **argv)
case 'V':
printf(_("%s from %s\n"), program_invocation_short_name,
PACKAGE_STRING);
- return(EXIT_SUCCESS);
+ return EXIT_SUCCESS;
case 'h':
usage(stdout);
default:
usage(stderr);
- return EXIT_FAILURE;
}
setupterm(termtype, STDOUT_FILENO, &ret);
switch (ret) {
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #11: 0010-tailf-harmonize-option-argument-and-explanation-in-u.patch --]
[-- Type: text/x-patch; name="0010-tailf-harmonize-option-argument-and-explanation-in-u.patch", Size: 986 bytes --]
From 372194ba12cb789f5e03e59b70dcc60461d9d386 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 10 Aug 2011 21:11:45 +0200
Subject: [PATCH 10/17] tailf: harmonize option argument and explanation in usage message
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
text-utils/tailf.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/text-utils/tailf.c b/text-utils/tailf.c
index fbe81c8..c8f3e91 100644
--- a/text-utils/tailf.c
+++ b/text-utils/tailf.c
@@ -200,8 +200,8 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out)
fprintf(out, _(
"\nOptions:\n"
- " -n, --lines NUMBER output the last N lines\n"
- " -NUMBER same as -n NUMBER\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"));
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #12: 0011-hexdump-fix-beginnin-typo-in-usage-message.patch --]
[-- Type: text/x-patch; name="0011-hexdump-fix-beginnin-typo-in-usage-message.patch", Size: 1098 bytes --]
From 68cbfe5ad7c2aadbabee083d156ebd5ed893b691 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 10 Aug 2011 21:12:56 +0200
Subject: [PATCH 11/17] hexdump: fix "beginnin" typo in usage message
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
text-utils/hexsyntax.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/text-utils/hexsyntax.c b/text-utils/hexsyntax.c
index 211e5d5..5cdd1de 100644
--- a/text-utils/hexsyntax.c
+++ b/text-utils/hexsyntax.c
@@ -145,7 +145,7 @@ void __attribute__((__noreturn__)) usage(FILE *out)
" -e format format string to be used for displaying data\n"
" -f format_file file that contains format strings\n"
" -n length interpret only length bytes of input\n"
- " -s offset skip offset bytes from the beginnin\n"
+ " -s offset skip offset bytes from the beginning\n"
" -v display without squeezing similar lines\n"
" -V output version information and exit\n\n"));
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #13: 0012-write-remove-inconsistent-periods-from-two-error-mes.patch --]
[-- Type: text/x-patch; name="0012-write-remove-inconsistent-periods-from-two-error-mes.patch", Size: 1097 bytes --]
From a592a8c71f020e3b44ca0f952de459cc94c39fdb Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 10 Aug 2011 21:13:44 +0200
Subject: [PATCH 12/17] write: remove inconsistent periods from two error messages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
term-utils/write.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/term-utils/write.c b/term-utils/write.c
index 8843362..b44f0e0 100644
--- a/term-utils/write.c
+++ b/term-utils/write.c
@@ -143,7 +143,7 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
if (!msgsok)
errx(EXIT_FAILURE,
- _("you have write permission turned off."));
+ _("you have write permission turned off"));
} else
mytty = "<no tty>";
@@ -161,7 +161,7 @@ int main(int argc, char **argv)
argv[2] += 5;
if (utmp_chk(argv[1], argv[2]))
errx(EXIT_FAILURE,
- _("%s is not logged in on %s."),
+ _("%s is not logged in on %s"),
argv[1], argv[2]);
if (term_chk(argv[2], &msgsok, &atime, 1))
exit(EXIT_FAILURE);
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #14: 0013-script-indicate-that-the-file-argument-to-timing-is-.patch --]
[-- Type: text/x-patch; name="0013-script-indicate-that-the-file-argument-to-timing-is-.patch", Size: 1521 bytes --]
From 215d39ef6686e02db8a5842e5051242763ba2bd6 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 10 Aug 2011 21:21:17 +0200
Subject: [PATCH 13/17] script: indicate that the file argument to --timing is optional
Also improve some other descriptions in the usage message.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
term-utils/script.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/term-utils/script.c b/term-utils/script.c
index 1f88253..deba155 100644
--- a/term-utils/script.c
+++ b/term-utils/script.c
@@ -133,13 +133,13 @@ usage(FILE *out)
fprintf(out, _(
"\nOptions:\n"
- " -a, --append append output\n"
- " -c, --command COMMAND run command rather than interactive shell\n"
+ " -a, --append append the output\n"
+ " -c, --command COMMAND run COMMAND rather than interactive shell\n"
" -r, --return return exit code of the child process\n"
" -f, --flush run flush after each write\n"
- " --force use output file even it would be a link\n"
+ " --force use output file even when it is a link\n"
" -q, --quiet be quiet\n"
- " -t, --timing=FILE output timing data to stderr, or to file\n"
+ " -t, --timing[=FILE] output timing data to stderr (or to FILE)\n"
" -V, --version output version information and exit\n"
" -h, --help display this help and exit\n\n"));
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #15: 0014-scriptreplay-add-options-to-usage-and-timingfile-is-.patch --]
[-- Type: text/x-patch; name="0014-scriptreplay-add-options-to-usage-and-timingfile-is-.patch", Size: 870 bytes --]
From 498625334309e88b21acc859a24b986721b3d184 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 10 Aug 2011 21:31:55 +0200
Subject: [PATCH 14/17] scriptreplay: add [options] to usage(), and timingfile is optional too
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
term-utils/scriptreplay.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/term-utils/scriptreplay.c b/term-utils/scriptreplay.c
index 86c82fd..d7fb031 100644
--- a/term-utils/scriptreplay.c
+++ b/term-utils/scriptreplay.c
@@ -36,7 +36,7 @@
void __attribute__((__noreturn__))
usage(FILE *out)
{
- fprintf(out, _("Usage: %s timingfile [typescript] [divisor]\n"),
+ fprintf(out, _("Usage: %s [options] [timingfile] [typescript] [divisor]\n"),
program_invocation_short_name);
fprintf(out, _(
"\nOptions:\n"
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #16: 0015-scriptreplay-improve-synopsis-and-formatting-in-man-.patch --]
[-- Type: text/x-patch; name="0015-scriptreplay-improve-synopsis-and-formatting-in-man-.patch", Size: 2215 bytes --]
From 8cf2b7aa035653cfc26226c275c412569447e492 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 10 Aug 2011 21:46:13 +0200
Subject: [PATCH 15/17] scriptreplay: improve synopsis and formatting in man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
term-utils/scriptreplay.1 | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/term-utils/scriptreplay.1 b/term-utils/scriptreplay.1
index 5610eb1..785d60e 100644
--- a/term-utils/scriptreplay.1
+++ b/term-utils/scriptreplay.1
@@ -145,9 +145,10 @@ scriptreplay \- play back typescripts, using timing information
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.B scriptreplay
-.I timingfile
-.RI [ typescript
-.RI [ divisor ]]
+.RI [ option ...]
+.RI [ timingfile ]
+.RI [ typescript ]
+.RI [ divisor ]
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This program replays a typescript, using timing information to ensure that
@@ -175,29 +176,29 @@ parameter.
By default, the typescript to display is assumed to be named \*(L"typescript\*(R",
but other filenames may be specified, as the second parameter.
.PP
-If the third parameter is specified, it is used as a speed-up multiplier. For
-example, a speed-up of 2 makes
+If the third parameter is specified, it is used as a speed-up multiplier.
+For example, a speed-up of 2 makes
.B scriptreplay
go twice as fast and a speed-up of 0.1 makes it go ten times slower
than the original session.
.SH OPTIONS
The options will overide old style arguments.
.TP
-.BR \-t , " \-\-timing FILE"
+.BR \-t , " \-\-timing " \fIfile\fR
File containing script timing output.
.TP
-.BR \-s , " \-\-typescript FILE"
-Script terminal output file.
+.BR \-s , " \-\-typescript " \fIfile\fR
+File containing the script terminal output.
.TP
-.BR \-d , " \-\-divisor NUM"
+.BR \-d , " \-\-divisor " \fInumber\fR
Speed up or slow down replay displaying by divisor. The argument
is floating point number.
.TP
.BR \-V , " \-\-version"
-Print version information.
+Display version information and exit.
.TP
.BR \-h , " \-\-help"
-Print a help message.
+Display a help message exit.
.SH "EXAMPLE"
.IX Header "EXAMPLE"
.Vb 7
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #17: 0016-script-normalize-formatting-of-the-man-page.patch --]
[-- Type: text/x-patch; name="0016-script-normalize-formatting-of-the-man-page.patch", Size: 3344 bytes --]
From 97795839cc61476c6d0cba4351bb9a1c29491ec6 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 10 Aug 2011 22:37:31 +0200
Subject: [PATCH 16/17] script: normalize formatting of the man page
Also improve the description of the --timing option,
and discard a then superfluous paragraph.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
term-utils/script.1 | 37 ++++++++++++++++++-------------------
1 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/term-utils/script.1 b/term-utils/script.1
index f618ec3..5f96b9c 100644
--- a/term-utils/script.1
+++ b/term-utils/script.1
@@ -40,16 +40,16 @@
.Sh SYNOPSIS
.Nm script
.Op Fl a
-.Op Fl c Ar COMMAND
+.Op Fl c Ar command
.Op Fl e
.Op Fl f
.Op Fl q
-.Op Fl t[=FILE]
+.Op Fl t Ns Op Ns = Ns Ar file
.Op Fl V
.Op Fl h
.Op Ar file
.Sh DESCRIPTION
-.Nm Script
+.Nm script
makes a typescript of everything printed on your terminal.
It is useful for students who need a hardcopy record of an interactive
session as proof of an assignment, as the typescript file
@@ -73,32 +73,31 @@ Append the output to
or
.Pa typescript ,
retaining the prior contents.
-.It Fl c, Fl Fl command Ar COMMAND
-Run the COMMAND rather than an interactive shell.
+.It Fl c, Fl Fl command Ar command
+Run the
+.Ar command
+rather than an interactive shell.
This makes it easy for a script to capture the output of a program that
behaves differently when its stdout is not a tty.
.It Fl e, Fl Fl return
-Return the exit code of the child process. Uses the same format as bash
+Return the exit code of the child process. Uses the same format as bash
termination on signal termination exit code is 128+n.
.It Fl f, Fl Fl flush
-Flush output after each write. This is nice for telecooperation:
-One person does `mkfifo foo; script -f foo' and another can
+Flush output after each write. This is nice for telecooperation:
+one person does `mkfifo foo; script -f foo', and another can
supervise real-time what is being done using `cat foo'.
.It Fl Fl force
-Allow default output destination, e.g. typescript file, to be
-hard or symbolic link. The command will follow symbolic link.
+Allow the default output destination, i.e. the typescript file, to be a
+hard or symbolic link. The command will follow a symbolic link.
.It Fl q, Fl Fl quiet
Be quiet.
-.It Fl t, Fl Fl timing[=FILE]
-Output timing data to standard error. This data contains two fields,
-separated by a space. The first field indicates how much time elapsed since
-the previous output. The second field indicates how many characters were
-output this time. This information can be used to replay typescripts with
+.It Fl t, Fl Fl timing Ns Op Ns = Ns Ar file
+Output timing data to standard error, or to \fIfile\fR when given.
+This data contains two fields, separated by a space.
+The first field indicates how much time elapsed since the previous output.
+The second field indicates how many characters were output this time.
+This information can be used to replay typescripts with
realistic typing and output delays.
-
-The timing option is able to take file path as an argument. The
-file is used as output detination instead of standard error when
-it is supplied.
.It Fl V, Fl Fl version
Output version information and exit.
.It Fl h, Fl Fl help
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #18: 0017-sfdisk-correct-inside-order-to-inside-outer-in-docum.patch --]
[-- Type: text/x-patch; name="0017-sfdisk-correct-inside-order-to-inside-outer-in-docum.patch", Size: 1801 bytes --]
From 43dd49413578c384a059ba7c0ffcad60dab718ed Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Thu, 11 Aug 2011 21:47:15 +0200
Subject: [PATCH 17/17] sfdisk: correct '--inside-order' to '--inside-outer' in documentation
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
fdisk/sfdisk.8 | 4 ++--
fdisk/sfdisk.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fdisk/sfdisk.8 b/fdisk/sfdisk.8
index c3f06b3..02e8d11 100644
--- a/fdisk/sfdisk.8
+++ b/fdisk/sfdisk.8
@@ -322,10 +322,10 @@ Caution, see warning section. To be documented.
.B \-\-not\-in\-order
Caution, see warning section. To be documented.
.TP
-.B \-\-inside\-order
+.B \-\-inside\-outer
Caution, see warning section. Chaining order.
.TP
-.B \-\-not\-inside\-order
+.B \-\-not\-inside\-outer
Caution, see warning section. Chaining order.
.TP
.B \-\-nested
diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c
index cd494d0..08e1b0c 100644
--- a/fdisk/sfdisk.c
+++ b/fdisk/sfdisk.c
@@ -2368,8 +2368,8 @@ usage(FILE * out) {
" --IBM same as --leave-last\n"
" --in-order partitions are in order\n"
" --not-in-order partitions are not in order\n"
- " --inside-order all logicals inside outermost extended\n"
- " --not-inside-order not all logicals inside outermost extended\n"
+ " --inside-outer all logicals inside outermost extended\n"
+ " --not-inside-outer not all logicals inside outermost extended\n"
" --nested every partition is disjoint from all others\n"
" --chained like nested, but extended partitions may lie outside\n"
" --onesector partitions are mutually disjoint\n"
--
1.7.0.4
next reply other threads:[~2011-08-11 20:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-11 20:22 Benno Schulenberg [this message]
2011-08-15 13:34 ` [patches] small fixes to some messages and man pages, and some questions Karel Zak
2011-08-15 18:34 ` Benno Schulenberg
2011-08-16 12:57 ` Karel Zak
2011-08-15 13:56 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1313094127.6807.140258128661629@webmail.messagingengine.com \
--to=bensberg@justemail.net \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox