diff options
| author | Sami Kerola <kerolasa@iki.fi> | 2019-08-21 20:25:31 +0100 |
|---|---|---|
| committer | Sami Kerola <kerolasa@iki.fi> | 2019-08-24 09:29:52 +0100 |
| commit | a7466bdcbe80ec3b387b835647c8e44fe4ef3c98 (patch) | |
| tree | 9af5cf684d459908f3a3a8a51b6c7f3b592446c5 | |
| parent | e8765d3301285b6d38111184ccec6f8efa473cd0 (diff) | |
| download | util-linux-a7466bdcbe80ec3b387b835647c8e44fe4ef3c98.tar.gz | |
po: remove possibility to translate static option arguments
These strings are expected to be wrote exactly as they are parsed, so make
translating them impossible. Since mkfs.cramfs -N option arguments need
this treatment use opportunity to slice usage() output to multiple lines.
Addresses: https://bugs.debian.org/907568
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| -rw-r--r-- | disk-utils/cfdisk.c | 3 | ||||
| -rw-r--r-- | disk-utils/fdisk.c | 9 | ||||
| -rw-r--r-- | disk-utils/mkfs.cramfs.c | 36 | ||||
| -rw-r--r-- | disk-utils/sfdisk.c | 9 | ||||
| -rw-r--r-- | misc-utils/cal.c | 3 | ||||
| -rw-r--r-- | sys-utils/dmesg.c | 3 |
6 files changed, 36 insertions, 27 deletions
diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c index 61f3258b3c..b219b2c621 100644 --- a/disk-utils/cfdisk.c +++ b/disk-utils/cfdisk.c @@ -2635,7 +2635,8 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Display or manipulate a disk partition table.\n"), out); fputs(USAGE_OPTIONS, out); - fputs(_(" -L, --color[=<when>] colorize output (auto, always or never)\n"), out); + fprintf(out, + _(" -L, --color[=<when>] colorize output (%s, %s or %s)\n"), "auto", "always", "never"); fprintf(out, " %s\n", USAGE_COLORS_DEFAULT); fputs(_(" -z, --zero start with zeroed partition table\n"), out); diff --git a/disk-utils/fdisk.c b/disk-utils/fdisk.c index 380f3f445a..95eac8feee 100644 --- a/disk-utils/fdisk.c +++ b/disk-utils/fdisk.c @@ -825,7 +825,8 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -b, --sector-size <size> physical and logical sector size\n"), out); fputs(_(" -B, --protect-boot don't erase bootbits when creating a new label\n"), out); fputs(_(" -c, --compatibility[=<mode>] mode is 'dos' or 'nondos' (default)\n"), out); - fputs(_(" -L, --color[=<when>] colorize output (auto, always or never)\n"), out); + fprintf(out, + _(" -L, --color[=<when>] colorize output (%s, %s or %s)\n"), "auto", "always", "never"); fprintf(out, " %s\n", USAGE_COLORS_DEFAULT); fputs(_(" -l, --list display partitions and exit\n"), out); @@ -834,8 +835,10 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -u, --units[=<unit>] display units: 'cylinders' or 'sectors' (default)\n"), out); fputs(_(" -s, --getsz display device size in 512-byte sectors [DEPRECATED]\n"), out); fputs(_(" --bytes print SIZE in bytes rather than in human readable format\n"), out); - fputs(_(" -w, --wipe <mode> wipe signatures (auto, always or never)\n"), out); - fputs(_(" -W, --wipe-partitions <mode> wipe signatures from new partitions (auto, always or never)\n"), out); + fprintf(out, + _(" -w, --wipe <mode> wipe signatures (%s, %s or %s)\n"), "auto", "always", "never"); + fprintf(out, + _(" -W, --wipe-partitions <mode> wipe signatures from new partitions (%s, %s or %s)\n"), "auto", "always", "never"); fputs(USAGE_SEPARATOR, out); fputs(_(" -C, --cylinders <number> specify the number of cylinders\n"), out); diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c index 71320a0a9e..e6afd2df0f 100644 --- a/disk-utils/mkfs.cramfs.c +++ b/disk-utils/mkfs.cramfs.c @@ -124,24 +124,24 @@ struct entry { static void __attribute__((__noreturn__)) usage(void) { - printf( - _("usage: %s [-h] [-v] [-b blksize] [-e edition] [-N endian] [-i file] " - "[-n name] dirname outfile\n" - " -v be verbose\n" - " -E make all warnings errors " - "(non-zero exit status)\n" - " -b blksize use this blocksize, must equal page size\n" - " -e edition set edition number (part of fsid)\n" - " -N endian set cramfs endianness (big|little|host), default host\n" - " -i file insert a file image into the filesystem\n" - " -n name set name of cramfs filesystem\n" - " -p pad by %d bytes for boot code\n" - " -s sort directory entries (old option, ignored)\n" - " -z make explicit holes\n" - " dirname root of the filesystem to be compressed\n" - " outfile output file\n"), - program_invocation_short_name, PAD_SIZE); - + fputs(USAGE_HEADER, stdout); + printf(_(" %s [-h] [-v] [-b blksize] [-e edition] [-N endian] [-i file] [-n name] dirname outfile\n"), + program_invocation_short_name); + fputs(USAGE_SEPARATOR, stdout); + puts(_("Make compressed ROM file system.")); + fputs(USAGE_OPTIONS, stdout); + puts(_( " -v be verbose")); + puts(_( " -E make all warnings errors (non-zero exit status)")); + puts(_( " -b blksize use this blocksize, must equal page size")); + puts(_( " -e edition set edition number (part of fsid)")); + printf(_(" -N endian set cramfs endianness (%s|%s|%s), default %s\n"), "big", "little", "host", "host"); + puts(_( " -i file insert a file image into the filesystem")); + puts(_( " -n name set name of cramfs filesystem")); + printf(_(" -p pad by %d bytes for boot code\n"), PAD_SIZE); + puts(_( " -s sort directory entries (old option, ignored)")); + puts(_( " -z make explicit holes")); + puts(_( " dirname root of the filesystem to be compressed")); + puts(_( " outfile output file")); fputs(USAGE_SEPARATOR, stdout); printf(USAGE_HELP_OPTIONS(16)); printf(USAGE_MAN_TAIL("mkfs.cramfs(8)")); diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c index 5e2d9adf76..7386147a82 100644 --- a/disk-utils/sfdisk.c +++ b/disk-utils/sfdisk.c @@ -1877,7 +1877,8 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" --bytes print SIZE in bytes rather than in human readable format\n"), out); fputs(_(" --move-data[=<typescript>] move partition data after relocation (requires -N)\n"), out); fputs(_(" -f, --force disable all consistency checking\n"), out); - fputs(_(" --color[=<when>] colorize output (auto, always or never)\n"), out); + fprintf(out, + _(" --color[=<when>] colorize output (%s, %s or %s)\n"), "auto", "always", "never"); fprintf(out, " %s\n", USAGE_COLORS_DEFAULT); fputs(_(" -N, --partno <num> specify partition number\n"), out); @@ -1887,8 +1888,10 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -O, --backup-file <path> override default backup file name\n"), out); fputs(_(" -o, --output <list> output columns\n"), out); fputs(_(" -q, --quiet suppress extra info messages\n"), out); - fputs(_(" -w, --wipe <mode> wipe signatures (auto, always or never)\n"), out); - fputs(_(" -W, --wipe-partitions <mode> wipe signatures from new partitions (auto, always or never)\n"), out); + fprintf(out, + _(" -w, --wipe <mode> wipe signatures (%s, %s or %s)\n"), "auto", "always", "never"); + fprintf(out, + _(" -W, --wipe-partitions <mode> wipe signatures from new partitions (%s, %s or %s)\n"), "auto", "always", "never"); fputs(_(" -X, --label <name> specify label type (dos, gpt, ...)\n"), out); fputs(_(" -Y, --label-nested <name> specify nested label type (dos, bsd)\n"), out); fputs(USAGE_SEPARATOR, out); diff --git a/misc-utils/cal.c b/misc-utils/cal.c index 1d4d241345..ca8e42e504 100644 --- a/misc-utils/cal.c +++ b/misc-utils/cal.c @@ -1133,7 +1133,8 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -y, --year show the whole year\n"), out); fputs(_(" -Y, --twelve show the next twelve months\n"), out); fputs(_(" -w, --week[=<num>] show US or ISO-8601 week numbers\n"), out); - fputs(_(" --color[=<when>] colorize messages (auto, always or never)\n"), out); + fprintf(out, + _(" --color[=<when>] colorize messages (%s, %s or %s)\n"), "auto", "always", "never"); fprintf(out, " %s\n", USAGE_COLORS_DEFAULT); diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c index 9f2e5b8042..d12ca8025a 100644 --- a/sys-utils/dmesg.c +++ b/sys-utils/dmesg.c @@ -277,7 +277,8 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -f, --facility <list> restrict output to defined facilities\n"), out); fputs(_(" -H, --human human readable output\n"), out); fputs(_(" -k, --kernel display kernel messages\n"), out); - fputs(_(" -L, --color[=<when>] colorize messages (auto, always or never)\n"), out); + fprintf(out, + _(" -L, --color[=<when>] colorize messages (%s, %s or %s)\n"), "auto", "always", "never"); fprintf(out, " %s\n", USAGE_COLORS_DEFAULT); fputs(_(" -l, --level <list> restrict output to defined levels\n"), out); |
