summaryrefslogtreecommitdiffstats
path: root/disk-utils/raw.c
diff options
context:
space:
mode:
authorBenno Schulenberg2011-02-27 16:27:43 +0100
committerKarel Zak2011-03-08 13:14:50 +0100
commit70532ede1aa69ca3eb6d3bdad24c7eae9efddd84 (patch)
tree5c0678c19a8c8755f7da56967a63c26aa6f52baf /disk-utils/raw.c
parentuuidd: add "-q" to synopsis, order options alphabetically (diff)
downloadkernel-qcow2-util-linux-70532ede1aa69ca3eb6d3bdad24c7eae9efddd84.tar.gz
kernel-qcow2-util-linux-70532ede1aa69ca3eb6d3bdad24c7eae9efddd84.tar.xz
kernel-qcow2-util-linux-70532ede1aa69ca3eb6d3bdad24c7eae9efddd84.zip
raw: remove constants from message strings; undo some abbrevs
Having a constant embedded within a message string prevents gettext from picking up the rest of the string. Also, translators may wish to change word order; using a constant as a prefix or postfix makes this impossible. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Diffstat (limited to 'disk-utils/raw.c')
-rw-r--r--disk-utils/raw.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/disk-utils/raw.c b/disk-utils/raw.c
index f634b6027..c2c1a3e4f 100644
--- a/disk-utils/raw.c
+++ b/disk-utils/raw.c
@@ -48,11 +48,11 @@ static void usage(int err)
{
fprintf(stderr,
_("Usage:\n"
- " %s " RAWDEVDIR "rawN <major> <minor>\n"
- " %s " RAWDEVDIR "rawN /dev/<blockdev>\n"
- " %s -q " RAWDEVDIR "rawN\n"
- " %s -qa\n"),
- progname, progname, progname, progname);
+ " %1$s %2$srawN <major> <minor>\n"
+ " %1$s %2$srawN /dev/<blockdevice>\n"
+ " %1$s -q %2$srawN\n"
+ " %1$s -qa\n"),
+ progname, RAWDEVDIR);
exit(err);
}
@@ -122,7 +122,7 @@ int main(int argc, char *argv[])
if (raw_minor == 0) {
fprintf (stderr,
- _("Device '%s' is control raw dev "
+ _("Device '%s' is the control raw device "
"(use raw<N> where <N> is greater than zero)\n"),
raw_name);
exit(2);
@@ -148,7 +148,7 @@ int main(int argc, char *argv[])
}
if (!S_ISBLK(statbuf.st_mode)) {
- fprintf (stderr, _("Device '%s' is not a block dev\n"),
+ fprintf (stderr, _("Device '%s' is not a block device\n"),
block_name);
exit(2);
}
@@ -183,9 +183,8 @@ void open_raw_ctl(void)
master_fd = open(RAWDEVCTL_OLD, O_RDWR, 0);
if (master_fd < 0) {
fprintf (stderr,
- _("Cannot open master raw device '"
- RAWDEVCTL
- "' (%s)\n"), strerror(errsv));
+ _("Cannot open master raw device '%s' (%s)\n"),
+ RAWDEVCTL, strerror(errsv));
exit(2);
}
}
@@ -238,8 +237,8 @@ int query(int minor, const char *raw_name, int quiet)
has_worked = 1;
if (quiet && !rq.block_major && !rq.block_minor)
return 0;
- printf (_(RAWDEVDIR "raw%d: bound to major %d, minor %d\n"),
- minor, (int) rq.block_major, (int) rq.block_minor);
+ printf (_("%sraw%d: bound to major %d, minor %d\n"),
+ RAWDEVDIR, minor, (int) rq.block_major, (int) rq.block_minor);
return 0;
}
@@ -258,8 +257,8 @@ int bind(int minor, int block_major, int block_minor)
strerror(errno));
exit(3);
}
- printf (_(RAWDEVDIR "raw%d: bound to major %d, minor %d\n"),
- raw_minor, (int) rq.block_major, (int) rq.block_minor);
+ printf (_("%sraw%d: bound to major %d, minor %d\n"),
+ RAWDEVDIR, raw_minor, (int) rq.block_major, (int) rq.block_minor);
return 0;
}