]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
translation: unify stat error messages
authorSami Kerola <kerolasa@iki.fi>
Sun, 15 Jul 2012 08:17:53 +0000 (10:17 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Jul 2012 16:18:22 +0000 (18:18 +0200)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
15 files changed:
disk-utils/fdformat.c
disk-utils/fsck.cramfs.c
disk-utils/mkfs.bfs.c
disk-utils/mkfs.cramfs.c
disk-utils/mkfs.minix.c
disk-utils/partx.c
misc-utils/namei.c
sys-utils/dmesg.c
sys-utils/fsfreeze.c
sys-utils/fstrim.c
sys-utils/swapon.c
sys-utils/switch_root.c
term-utils/mesg.c
term-utils/wall.c
text-utils/tailf.c

index ec2f6170ebe6fee53ae68af76331df982013e813..97fd4e8d6ddd19bb13bcd5f59044c8545767441f 100644 (file)
@@ -143,7 +143,7 @@ int main(int argc, char **argv)
        if (argc < 1)
                usage(stderr);
        if (stat(argv[0], &st) < 0)
-               err(EXIT_FAILURE, _("cannot stat file %s"), argv[0]);
+               err(EXIT_FAILURE, _("stat failed %s"), argv[0]);
        if (!S_ISBLK(st.st_mode))
                /* do not test major - perhaps this was an USB floppy */
                errx(EXIT_FAILURE, _("%s: not a block device"), argv[0]);
index eab4ed590c066973414fa31dc2fa063f1309b0d4..ac378307e277905f89ed83a114dc0f5e6a47ff55 100644 (file)
@@ -139,7 +139,7 @@ static void test_super(int *start, size_t * length)
 
        /* find the physical size of the file or block device */
        if (stat(filename, &st) < 0)
-               err(FSCK_EX_ERROR, _("stat failed: %s"), filename);
+               err(FSCK_EX_ERROR, _("stat failed %s"), filename);
 
        fd = open(filename, O_RDONLY);
        if (fd < 0)
index c93067e2026a6cbd2783c50c69ee9894193afa02..d83f9e0828fd873cae49fee970810bbcc531cc86 100644 (file)
@@ -174,7 +174,7 @@ int main(int argc, char **argv)
        device = argv[optind++];
 
        if (stat(device, &statbuf) < 0)
-               err(EXIT_FAILURE, _("cannot stat device %s"), device);
+               err(EXIT_FAILURE, _("stat failed %s"), device);
 
        if (!S_ISBLK(statbuf.st_mode))
                errx(EXIT_FAILURE, _("%s is not a block special device"), device);
index 37c4da180e2660cdf57244cbcf78c24a27c15d94..44d7740839354935829160837a48c758c4854d24 100644 (file)
@@ -745,7 +745,7 @@ int main(int argc, char **argv)
                case 'i':
                        opt_image = optarg;
                        if (lstat(opt_image, &st) < 0)
-                               err(MKFS_EX_USAGE, _("cannot stat %s"), opt_image);
+                               err(MKFS_EX_USAGE, _("stat failed %s"), opt_image);
                        image_length = st.st_size; /* may be padded later */
                        fslen_ub += (image_length + 3); /* 3 is for padding */
                        break;
@@ -780,7 +780,7 @@ int main(int argc, char **argv)
        outfile = argv[optind + 1];
 
        if (stat(dirname, &st) < 0)
-               err(MKFS_EX_USAGE, _("cannot stat %s"), dirname);
+               err(MKFS_EX_USAGE, _("stat failed %s"), dirname);
        fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0666);
        if (fd < 0)
                err(MKFS_EX_USAGE, _("cannot open %s"), outfile);
index c5baac1256c0c6ec33c02f554fa33dccebfd226c..a1b5162fafdb11dd6b7e7623cfaef372fb5362b4 100644 (file)
@@ -752,7 +752,7 @@ int main(int argc, char ** argv) {
                strcpy(tmp+2, ".badblocks");
        }
        if (stat(device_name, &statbuf) < 0)
-               err(MKFS_EX_ERROR, _("%s: stat failed"), device_name);
+               err(MKFS_EX_ERROR, _("stat failed %s"), device_name);
        if (S_ISBLK(statbuf.st_mode))
                DEV = open(device_name,O_RDWR | O_EXCL);
        else
index 6c3287b54746aeccdcf5541acd3849a6d9ddb0ae..a971a7ea8e7fd6010a775ecbe73970249c32874f 100644 (file)
@@ -766,7 +766,7 @@ int main(int argc, char **argv)
                device = argv[optind];
 
                if (stat(device, &sb))
-                       err(EXIT_FAILURE, _("%s: stat failed"), device);
+                       err(EXIT_FAILURE, _("stat failed %s"), device);
 
                part_devno = sb.st_rdev;
 
index fc1689d2d8ce55880da1ef876618acbe03eeb0a8..376a2f0c3cf6935d82f9fcef3de6e3a97157973d 100644 (file)
@@ -228,7 +228,7 @@ dotdot_stat(const char *dirname, struct stat *st)
        memcpy(path + len, DOTDOTDIR, sizeof(DOTDOTDIR));
 
        if (stat(path, st))
-               err(EXIT_FAILURE, _("could not stat '%s'"), path);
+               err(EXIT_FAILURE, _("stat failed %s"), path);
        free(path);
        return st;
 }
index 9fc7982a1ad174bdaf4051a568f18977af3bed8b..2aa904cab086359116793e5c4303d528d3a452cc 100644 (file)
@@ -361,7 +361,7 @@ static ssize_t read_file_buffer(struct dmesg_control *ctl,
        if (fd < 0)
                err(EXIT_FAILURE, _("cannot open: %s"), filename);
        if (fstat(fd, &st))
-               err(EXIT_FAILURE, _("cannot stat: %s"), filename);
+               err(EXIT_FAILURE, _("stat failed %s"), filename);
 
        *buf = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
        if (*buf == MAP_FAILED)
index 5d1702158a633a8d3fe4e46bd0ea61995082160b..1585abb765c137555f76b6724d433325758207da 100644 (file)
@@ -104,7 +104,7 @@ int main(int argc, char **argv)
                err(EXIT_FAILURE, _("%s: open failed"), path);
 
        if (fstat(fd, &sb) == -1) {
-               warn(_("%s: fstat failed"), path);
+               warn(_("stat failed %s"), path);
                goto done;
        }
 
index bb88bb8043c441ecfe42570306059e1e6d6afeab..d7633b07a2f58e01a9ebf6c46be940c5d7835263 100644 (file)
@@ -133,7 +133,7 @@ int main(int argc, char **argv)
        }
 
        if (stat(path, &sb) == -1)
-               err(EXIT_FAILURE, _("%s: stat failed"), path);
+               err(EXIT_FAILURE, _("stat failed %s"), path);
        if (!S_ISDIR(sb.st_mode))
                errx(EXIT_FAILURE, _("%s: not a directory"), path);
 
index 05d025c00e681f5e1fe51cd7e9ce5b66a16779ba..aec7d2e5ea87a30bd562c6a0b7ee824ec3afaf7f 100644 (file)
@@ -443,7 +443,7 @@ static int swapon_checks(const char *special)
        unsigned long long devsize = 0;
 
        if (stat(special, &st) < 0) {
-               warn(_("%s: stat failed"), special);
+               warn(_("stat failed %s"), special);
                goto err;
        }
 
index 4ff3bff8f957186287c627b31846f34ec081cfb5..bcd801d5fbb6c1ed368a1d2cfed6a746ad9a5efe 100644 (file)
@@ -62,7 +62,7 @@ static int recursiveRemove(int fd)
        dfd = dirfd(dir);
 
        if (fstat(dfd, &rb)) {
-               warn(_("failed to stat directory"));
+               warn(_("stat failed"));
                goto done;
        }
 
@@ -85,7 +85,7 @@ static int recursiveRemove(int fd)
                        struct stat sb;
 
                        if (fstatat(dfd, d->d_name, &sb, AT_SYMLINK_NOFOLLOW)) {
-                               warn(_("failed to stat %s"), d->d_name);
+                               warn(_("stat failed %s"), d->d_name);
                                continue;
                        }
 
@@ -125,7 +125,7 @@ static int switchroot(const char *newroot)
        struct stat newroot_stat, sb;
 
        if (stat(newroot, &newroot_stat) != 0) {
-               warn(_("failed to stat directory %s"), newroot);
+               warn(_("stat failed %s"), newroot);
                return -1;
        }
 
index 366c679acd684acfab28afcf207bfb18b544d53e..b24e7833547d1295f9ee03a6e6438888ec67fc89 100644 (file)
@@ -121,7 +121,7 @@ int main(int argc, char *argv[])
                err(MESG_EXIT_FAILURE, _("ttyname failed"));
 
        if (stat(tty, &sb) < 0)
-               err(MESG_EXIT_FAILURE, _("stat %s failed"), tty);
+               err(MESG_EXIT_FAILURE, _("stat failed %s"), tty);
 
        if (!*argv) {
                if (sb.st_mode & (S_IWGRP | S_IWOTH)) {
index 996650638fbf5f6b1c9fbe9a6796f81f547b81d9..1f44be4c7efb0b5d2a9b25b40f0a154307765d57 100644 (file)
@@ -266,7 +266,7 @@ makemsg(char *fname, size_t *mbufsize, int print_banner)
        rewind(fp);
 
        if (fstat(fileno(fp), &sbuf))
-               err(EXIT_FAILURE, _("fstat failed"));
+               err(EXIT_FAILURE, _("stat failed"));
 
        *mbufsize = (size_t) sbuf.st_size;
        mbuf = xmalloc(*mbufsize);
index 10589d8bc1524250dacdb8fab9f917cd90f01520..9e77a2f0936f75fc500da1b091eb4e44746c227e 100644 (file)
@@ -99,7 +99,7 @@ roll_file(const char *filename, off_t *size)
                err(EXIT_FAILURE, _("cannot open \"%s\" for read"), filename);
 
        if (fstat(fd, &st) == -1)
-               err(EXIT_FAILURE, _("cannot stat \"%s\""), filename);
+               err(EXIT_FAILURE, _("stat failed %s"), filename);
 
        if (st.st_size == *size) {
                close(fd);
@@ -277,7 +277,7 @@ int main(int argc, char **argv)
        filename = argv[optind];
 
        if (stat(filename, &st) != 0)
-               err(EXIT_FAILURE, _("cannot stat \"%s\""), filename);
+               err(EXIT_FAILURE, _("stat failed %s"), filename);
 
        size = st.st_size;;
        tailf(filename, lines);