summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--disk-utils/addpart.c2
-rw-r--r--disk-utils/delpart.c2
-rw-r--r--disk-utils/fdformat.c4
-rw-r--r--disk-utils/fsck.c2
-rw-r--r--disk-utils/fsck.cramfs.c4
-rw-r--r--disk-utils/fsck.minix.c2
-rw-r--r--disk-utils/isosize.c2
-rw-r--r--disk-utils/mkfs.cramfs.c2
-rw-r--r--disk-utils/mkfs.minix.c2
-rw-r--r--disk-utils/partx.c2
-rw-r--r--disk-utils/swaplabel.c2
-rw-r--r--fdisks/cfdisk.c6
-rw-r--r--fdisks/fdisk.c6
-rw-r--r--lib/at.c2
-rw-r--r--lib/path.c4
-rw-r--r--login-utils/islocal.c3
-rw-r--r--login-utils/last.c2
-rw-r--r--login-utils/sulogin.c8
-rw-r--r--login-utils/utmpdump.c4
-rw-r--r--login-utils/vipw.c2
-rw-r--r--misc-utils/findmnt.c2
-rw-r--r--misc-utils/mcookie.c4
-rw-r--r--sys-utils/dmesg.c2
-rw-r--r--sys-utils/eject.c4
-rw-r--r--sys-utils/fallocate.c2
-rw-r--r--sys-utils/fsfreeze.c2
-rw-r--r--sys-utils/fstrim.c2
-rw-r--r--sys-utils/hwclock-cmos.c2
-rw-r--r--sys-utils/hwclock-rtc.c10
-rw-r--r--sys-utils/hwclock.c2
-rw-r--r--sys-utils/losetup.c2
-rw-r--r--sys-utils/rtcwake.c6
-rw-r--r--sys-utils/swapon.c4
-rw-r--r--sys-utils/wdctl.c2
-rw-r--r--term-utils/script.c6
-rw-r--r--term-utils/scriptreplay.c4
-rw-r--r--term-utils/wall.c2
-rw-r--r--text-utils/pg.c2
-rw-r--r--text-utils/rev.c2
-rw-r--r--text-utils/tailf.c4
-rw-r--r--text-utils/ul.c2
41 files changed, 65 insertions, 66 deletions
diff --git a/disk-utils/addpart.c b/disk-utils/addpart.c
index 0d814bf3e..c0f25a539 100644
--- a/disk-utils/addpart.c
+++ b/disk-utils/addpart.c
@@ -49,7 +49,7 @@ int main(int argc, char **argv)
usage(stderr);
if ((fd = open(argv[1], O_RDONLY)) < 0)
- err(EXIT_FAILURE, _("%s: open failed"), argv[1]);
+ err(EXIT_FAILURE, _("cannot open %s"), argv[1]);
if (partx_add_partition(fd,
strtou32_or_err(argv[2], _("invalid partition number argument")),
diff --git a/disk-utils/delpart.c b/disk-utils/delpart.c
index 79925db89..e940e3bed 100644
--- a/disk-utils/delpart.c
+++ b/disk-utils/delpart.c
@@ -50,7 +50,7 @@ int main(int argc, char **argv)
if ((fd = open(argv[1], O_RDONLY)) < 0)
- err(EXIT_FAILURE, _("%s: open failed"), argv[1]);
+ err(EXIT_FAILURE, _("cannot open %s"), argv[1]);
if (partx_del_partition(fd,
strtou32_or_err(argv[2], _("invalid partition number argument"))))
diff --git a/disk-utils/fdformat.c b/disk-utils/fdformat.c
index 97fd4e8d6..e937a8ed5 100644
--- a/disk-utils/fdformat.c
+++ b/disk-utils/fdformat.c
@@ -59,7 +59,7 @@ static void verify_disk(char *name)
printf(_("Verifying ... "));
fflush(stdout);
if ((fd = open(name, O_RDONLY)) < 0)
- err(EXIT_FAILURE, _("cannot open file %s"), name);
+ err(EXIT_FAILURE, _("cannot open %s"), name);
for (cyl = 0; cyl < param.track; cyl++) {
int read_bytes;
@@ -152,7 +152,7 @@ int main(int argc, char **argv)
ctrl = open(argv[0], O_WRONLY);
if (ctrl < 0)
- err(EXIT_FAILURE, _("cannot open file %s"), argv[0]);
+ err(EXIT_FAILURE, _("cannot open %s"), argv[0]);
if (ioctl(ctrl, FDGETPRM, (long)&param) < 0)
err(EXIT_FAILURE, _("Could not determine current format type"));
diff --git a/disk-utils/fsck.c b/disk-utils/fsck.c
index 46646a99b..71263a273 100644
--- a/disk-utils/fsck.c
+++ b/disk-utils/fsck.c
@@ -1344,7 +1344,7 @@ static void parse_argv(int argc, char *argv[])
* /proc/partitions isn't found.
*/
if (access(_PATH_PROC_PARTITIONS, R_OK) < 0) {
- warn(_("couldn't open %s"),
+ warn(_("cannot open %s"),
_PATH_PROC_PARTITIONS);
errx(FSCK_EX_ERROR, _("Is /proc mounted?"));
}
diff --git a/disk-utils/fsck.cramfs.c b/disk-utils/fsck.cramfs.c
index ac378307e..d64e2bed9 100644
--- a/disk-utils/fsck.cramfs.c
+++ b/disk-utils/fsck.cramfs.c
@@ -143,7 +143,7 @@ static void test_super(int *start, size_t * length)
fd = open(filename, O_RDONLY);
if (fd < 0)
- err(FSCK_EX_ERROR, _("open failed: %s"), filename);
+ err(FSCK_EX_ERROR, _("cannot open %s"), filename);
if (S_ISBLK(st.st_mode)) {
unsigned long long bytes;
@@ -495,7 +495,7 @@ static void do_file(char *path, struct cramfs_inode *i)
if (opt_extract) {
fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, i->mode);
if (fd < 0)
- err(FSCK_EX_ERROR, _("open failed: %s"), path);
+ err(FSCK_EX_ERROR, _("cannot open %s"), path);
}
if (i->size)
do_uncompress(path, fd, offset, i->size);
diff --git a/disk-utils/fsck.minix.c b/disk-utils/fsck.minix.c
index 5e56e832d..f24a9f215 100644
--- a/disk-utils/fsck.minix.c
+++ b/disk-utils/fsck.minix.c
@@ -1302,7 +1302,7 @@ main(int argc, char **argv) {
}
IN = open(device_name, repair ? O_RDWR : O_RDONLY);
if (IN < 0)
- die(_("unable to open '%s': %s"), device_name, strerror(errno));
+ die(_("cannot open %s: %s"), device_name, strerror(errno));
for (count = 0; count < 3; count++)
sync();
read_superblock();
diff --git a/disk-utils/isosize.c b/disk-utils/isosize.c
index 4ba34d550..e5defae29 100644
--- a/disk-utils/isosize.c
+++ b/disk-utils/isosize.c
@@ -123,7 +123,7 @@ static void isosize(char *filenamep, int xflag, long divisor)
struct iso_primary_descriptor ipd;
if ((fd = open(filenamep, O_RDONLY)) < 0)
- err(EXIT_FAILURE, _("failed to open %s"), filenamep);
+ err(EXIT_FAILURE, _("cannot open %s"), filenamep);
if (lseek(fd, 16 << 11, 0) == (off_t) - 1)
err(EXIT_FAILURE, _("seek error on %s"), filenamep);
diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c
index 44d774083..f504a3236 100644
--- a/disk-utils/mkfs.cramfs.c
+++ b/disk-utils/mkfs.cramfs.c
@@ -657,7 +657,7 @@ static unsigned int write_file(char *file, char *base, unsigned int offset)
fd = open(file, O_RDONLY);
if (fd < 0)
- err(MKFS_EX_ERROR, _("cannot open file %s"), file);
+ err(MKFS_EX_ERROR, _("cannot open %s"), file);
buf = mmap(NULL, image_length, PROT_READ, MAP_PRIVATE, fd, 0);
memcpy(base + offset, buf, image_length);
munmap(buf, image_length);
diff --git a/disk-utils/mkfs.minix.c b/disk-utils/mkfs.minix.c
index a1b5162fa..49626bf2a 100644
--- a/disk-utils/mkfs.minix.c
+++ b/disk-utils/mkfs.minix.c
@@ -759,7 +759,7 @@ int main(int argc, char ** argv) {
DEV = open(device_name,O_RDWR);
if (DEV<0)
- err(MKFS_EX_ERROR, _("%s: open failed"), device_name);
+ err(MKFS_EX_ERROR, _("cannot open %s"), device_name);
if (S_ISBLK(statbuf.st_mode)) {
int sectorsize;
diff --git a/disk-utils/partx.c b/disk-utils/partx.c
index a971a7ea8..69c559dea 100644
--- a/disk-utils/partx.c
+++ b/disk-utils/partx.c
@@ -827,7 +827,7 @@ int main(int argc, char **argv)
errx(EXIT_FAILURE, _("%s: not a block device"), wholedisk);
}
if ((fd = open(wholedisk, O_RDONLY)) == -1)
- err(EXIT_FAILURE, _("%s: open failed"), wholedisk);
+ err(EXIT_FAILURE, _("cannot open %s"), wholedisk);
if (what == ACT_DELETE)
rc = del_parts(fd, wholedisk, disk_devno, lower, upper);
diff --git a/disk-utils/swaplabel.c b/disk-utils/swaplabel.c
index 44b1cb368..3e3e78b16 100644
--- a/disk-utils/swaplabel.c
+++ b/disk-utils/swaplabel.c
@@ -102,7 +102,7 @@ static int change_info(const char *devname, const char *label, const char *uuid)
fd = open(devname, O_RDWR);
if (fd < 0) {
- warn(_("%s: failed to open"), devname);
+ warn(_("cannot open %s"), devname);
goto err;
}
#ifdef HAVE_LIBUUID
diff --git a/fdisks/cfdisk.c b/fdisks/cfdisk.c
index 967a1034c..0ceed33ba 100644
--- a/fdisks/cfdisk.c
+++ b/fdisks/cfdisk.c
@@ -1820,7 +1820,7 @@ print_raw_table(void) {
if ((fp = fopen(fname, "w")) == NULL) {
char errstr[LINE_LENGTH];
snprintf(errstr, sizeof(errstr),
- _("Cannot open file '%s'"), fname);
+ _("cannot open %s"), fname);
print_warning(errstr);
return;
}
@@ -1938,7 +1938,7 @@ print_p_info(void) {
if (to_file) {
if ((fp = fopen(fname, "w")) == NULL) {
char errstr[LINE_LENGTH];
- snprintf(errstr, LINE_LENGTH, _("Cannot open file '%s'"), fname);
+ snprintf(errstr, LINE_LENGTH, _("cannot open %s"), fname);
print_warning(errstr);
return;
}
@@ -2022,7 +2022,7 @@ print_part_table(void) {
if (to_file) {
if ((fp = fopen(fname, "w")) == NULL) {
char errstr[LINE_LENGTH];
- snprintf(errstr, LINE_LENGTH, _("Cannot open file '%s'"), fname);
+ snprintf(errstr, LINE_LENGTH, _("cannot open %s"), fname);
print_warning(errstr);
return;
}
diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c
index 3fede9591..99174faef 100644
--- a/fdisks/fdisk.c
+++ b/fdisks/fdisk.c
@@ -1783,7 +1783,7 @@ static void print_partition_table_from_option(char *device, unsigned long sector
struct fdisk_context *cxt = fdisk_new_context_from_filename(device, 1); /* read-only */
if (!cxt)
- err(EXIT_FAILURE, _("unable to open %s"), device);
+ err(EXIT_FAILURE, _("cannot open %s"), device);
if (sector_size) /* passed -b option, override autodiscovery */
cxt->phy_sector_size = cxt->sector_size = sector_size;
/* passed CHS option(s), override autodiscovery */
@@ -1970,7 +1970,7 @@ static sector_t get_dev_blocks(char *dev)
sector_t size;
if ((fd = open(dev, O_RDONLY)) < 0)
- err(EXIT_FAILURE, _("unable to open %s"), dev);
+ err(EXIT_FAILURE, _("cannot open %s"), dev);
if (blkdev_get_sectors(fd, &size) == -1) {
close(fd);
err(EXIT_FAILURE, _("BLKGETSIZE ioctl failed on %s"), dev);
@@ -2085,7 +2085,7 @@ int main(int argc, char **argv)
cxt = fdisk_new_context_from_filename(argv[optind], 0);
if (!cxt)
- err(EXIT_FAILURE, _("unable to open %s"), argv[optind]);
+ err(EXIT_FAILURE, _("cannot open %s"), argv[optind]);
if (sector_size) /* passed -b option, override autodiscovery */
cxt->phy_sector_size = cxt->sector_size = sector_size;
/* passed CHS option(s), override autodiscovery */
diff --git a/lib/at.c b/lib/at.c
index 062a10f1b..bbce51630 100644
--- a/lib/at.c
+++ b/lib/at.c
@@ -116,7 +116,7 @@ int main(int argc, char *argv[])
dir = opendir(dirname);
if (!dir)
- err(EXIT_FAILURE, "%s: open failed", dirname);
+ err(EXIT_FAILURE, "cannot open %s", dirname);
while ((d = readdir(dir))) {
struct stat st;
diff --git a/lib/path.c b/lib/path.c
index 0d4d39135..8437c0220 100644
--- a/lib/path.c
+++ b/lib/path.c
@@ -55,7 +55,7 @@ path_vfopen(const char *mode, int exit_on_error, const char *path, va_list ap)
f = fopen(p, mode);
if (!f && exit_on_error)
- err(EXIT_FAILURE, _("error: cannot open %s"), p);
+ err(EXIT_FAILURE, _("cannot open %s"), p);
return f;
}
@@ -67,7 +67,7 @@ path_vopen(int flags, const char *path, va_list ap)
fd = open(p, flags);
if (fd == -1)
- err(EXIT_FAILURE, _("error: cannot open %s"), p);
+ err(EXIT_FAILURE, _("cannot open %s"), p);
return fd;
}
diff --git a/login-utils/islocal.c b/login-utils/islocal.c
index e23ca44e0..1f8516618 100644
--- a/login-utils/islocal.c
+++ b/login-utils/islocal.c
@@ -84,8 +84,7 @@ int is_local(const char *user)
int rv;
if ((rv = is_local_in_file(user, _PATH_PASSWD)) < 0) {
perror(_PATH_PASSWD);
- fprintf(stderr, _("Failed to open %s for reading, exiting."),
- _PATH_PASSWD);
+ fprintf(stderr, _("cannot open %s"), _PATH_PASSWD);
exit(1);
} else {
return rv;
diff --git a/login-utils/last.c b/login-utils/last.c
index 1b1bee119..77a890abe 100644
--- a/login-utils/last.c
+++ b/login-utils/last.c
@@ -242,7 +242,7 @@ wtmp(void) {
(void)signal(SIGQUIT, onintr);
if ((fd = open(file,O_RDONLY)) < 0)
- err(EXIT_FAILURE, _("%s: open failed"), file);
+ err(EXIT_FAILURE, _("cannot open %s"), file);
fstat(fd, &st);
utl_len = st.st_size;
diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c
index 7750ad957..7ac493be2 100644
--- a/login-utils/sulogin.c
+++ b/login-utils/sulogin.c
@@ -213,7 +213,7 @@ static struct passwd *getrootpwent(int try_manually)
pwd.pw_gid = 0;
if ((fp = fopen(_PATH_PASSWD, "r")) == NULL) {
- warn(_("%s: open failed"), _PATH_PASSWD);
+ warn(_("cannot open %s"), _PATH_PASSWD);
return &pwd;
}
@@ -251,7 +251,7 @@ static struct passwd *getrootpwent(int try_manually)
*/
strcpy(pwd.pw_passwd, "");
if ((fp = fopen(_PATH_SHADOW_PASSWD, "r")) == NULL) {
- warn(_("%s: open failed"), _PATH_PASSWD);
+ warn(_("cannot open %s"), _PATH_PASSWD);
return &pwd;
}
while ((p = fgets(sline, 256, fp)) != NULL) {
@@ -521,7 +521,7 @@ int main(int argc, char **argv)
if (tty || (tty = getenv("CONSOLE"))) {
if ((fd = open(tty, O_RDWR)) < 0) {
- warn(_("%s: open failed"), tty);
+ warn(_("cannot open %s"), tty);
fd = dup(0);
}
@@ -556,7 +556,7 @@ int main(int argc, char **argv)
if (fd > 2)
close(fd);
if ((fd = open(tty, O_RDWR|O_NOCTTY)) < 0)
- warn(_("%s: open failed"), tty);
+ warn(_("cannot open %s"), tty);
else {
ioctl(0, TIOCSCTTY, (char *)1);
tcsetpgrp(fd, ppgrp);
diff --git a/login-utils/utmpdump.c b/login-utils/utmpdump.c
index d907e0207..cb850af13 100644
--- a/login-utils/utmpdump.c
+++ b/login-utils/utmpdump.c
@@ -115,7 +115,7 @@ static void roll_file(const char *filename, off_t *size)
off_t pos;
if (!(fp = fopen(filename, "r")))
- err(EXIT_FAILURE, _("%s: open failed"), filename);
+ err(EXIT_FAILURE, _("cannot open %s"), filename);
if (fstat(fileno(fp), &st) == -1)
err(EXIT_FAILURE, _("%s: stat failed"), filename);
@@ -340,7 +340,7 @@ int main(int argc, char **argv)
filename = argv[optind];
fp = fopen(filename, "r");
if (!fp)
- err(EXIT_FAILURE, _("%s: open failed"), filename);
+ err(EXIT_FAILURE, _("cannot open %s"), filename);
} else {
if (follow)
errx(EXIT_FAILURE, _("following standard input is unsupported"));
diff --git a/login-utils/vipw.c b/login-utils/vipw.c
index a5982813b..33771127a 100644
--- a/login-utils/vipw.c
+++ b/login-utils/vipw.c
@@ -264,7 +264,7 @@ static void edit_file(int is_shadow)
passwd_file = open(orig_file, O_RDONLY, 0);
if (passwd_file < 0)
- err(EXIT_FAILURE, "%s: %s", _("cannot open file"), orig_file);
+ err(EXIT_FAILURE, _("cannot open %s"), orig_file);
tmp_fd = pw_tmpfile(passwd_file);
if (fstat(fileno(tmp_fd), &begin))
diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c
index 094734d72..6df2f0612 100644
--- a/misc-utils/findmnt.c
+++ b/misc-utils/findmnt.c
@@ -893,7 +893,7 @@ static int poll_table(struct libmnt_table *tb, const char *tabfile,
f = fopen(tabfile, "r");
if (!f) {
- warn(_("%s: open failed"), tabfile);
+ warn(_("cannot open %s"), tabfile);
goto done;
}
diff --git a/misc-utils/mcookie.c b/misc-utils/mcookie.c
index b10f5c6fa..b7b1762dc 100644
--- a/misc-utils/mcookie.c
+++ b/misc-utils/mcookie.c
@@ -144,7 +144,7 @@ int main(int argc, char **argv)
fd = open(file, O_RDONLY);
if (fd < 0) {
- warn(_("Could not open %s"), file);
+ warn(_("cannot open %s"), file);
} else {
count = hash_file(&ctx, fd);
if (verbose)
@@ -178,7 +178,7 @@ int main(int argc, char **argv)
if (rngs[i].minlength && r >= rngs[i].minlength)
break;
} else if (verbose)
- warn(_("Could not open %s"), rngs[i].path);
+ warn(_("cannot open %s"), rngs[i].path);
}
MD5Final(digest, &ctx);
diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c
index 2aa904cab..033d2e5e8 100644
--- a/sys-utils/dmesg.c
+++ b/sys-utils/dmesg.c
@@ -359,7 +359,7 @@ static ssize_t read_file_buffer(struct dmesg_control *ctl,
int fd = open(filename, O_RDONLY);
if (fd < 0)
- err(EXIT_FAILURE, _("cannot open: %s"), filename);
+ err(EXIT_FAILURE, _("cannot open %s"), filename);
if (fstat(fd, &st))
err(EXIT_FAILURE, _("stat failed %s"), filename);
diff --git a/sys-utils/eject.c b/sys-utils/eject.c
index f621b062e..fdc3402c2 100644
--- a/sys-utils/eject.c
+++ b/sys-utils/eject.c
@@ -497,7 +497,7 @@ static int read_speed(const char *devname)
f = fopen(_PATH_PROC_CDROMINFO, "r");
if (!f)
- err(EXIT_FAILURE, _("%s: open failed"), _PATH_PROC_CDROMINFO);
+ err(EXIT_FAILURE, _("cannot open %s"), _PATH_PROC_CDROMINFO);
name = rindex(devname, '/') + 1;
@@ -689,7 +689,7 @@ static int open_device(const char *name)
if (fd < 0)
fd = open(name, O_RDONLY|O_NONBLOCK);
if (fd == -1)
- err(EXIT_FAILURE, _("%s: open failed"), name);
+ err(EXIT_FAILURE, _("cannot open %s"), name);
return fd;
}
diff --git a/sys-utils/fallocate.c b/sys-utils/fallocate.c
index adfaa70f7..ff0f9e6e1 100644
--- a/sys-utils/fallocate.c
+++ b/sys-utils/fallocate.c
@@ -150,7 +150,7 @@ int main(int argc, char **argv)
fd = open(fname, O_WRONLY|O_CREAT, 0644);
if (fd < 0)
- err(EXIT_FAILURE, _("%s: open failed"), fname);
+ err(EXIT_FAILURE, _("cannot open %s"), fname);
#ifdef HAVE_FALLOCATE
error = fallocate(fd, mode, offset, length);
diff --git a/sys-utils/fsfreeze.c b/sys-utils/fsfreeze.c
index 1585abb76..716144247 100644
--- a/sys-utils/fsfreeze.c
+++ b/sys-utils/fsfreeze.c
@@ -101,7 +101,7 @@ int main(int argc, char **argv)
fd = open(path, O_RDONLY);
if (fd < 0)
- err(EXIT_FAILURE, _("%s: open failed"), path);
+ err(EXIT_FAILURE, _("cannot open %s"), path);
if (fstat(fd, &sb) == -1) {
warn(_("stat failed %s"), path);
diff --git a/sys-utils/fstrim.c b/sys-utils/fstrim.c
index d7633b07a..332601df7 100644
--- a/sys-utils/fstrim.c
+++ b/sys-utils/fstrim.c
@@ -139,7 +139,7 @@ int main(int argc, char **argv)
fd = open(path, O_RDONLY);
if (fd < 0)
- err(EXIT_FAILURE, _("%s: open failed"), path);
+ err(EXIT_FAILURE, _("cannot open %s"), path);
if (ioctl(fd, FITRIM, &range))
err(EXIT_FAILURE, _("%s: FITRIM ioctl failed"), path);
diff --git a/sys-utils/hwclock-cmos.c b/sys-utils/hwclock-cmos.c
index 366d934fb..85452b5c2 100644
--- a/sys-utils/hwclock-cmos.c
+++ b/sys-utils/hwclock-cmos.c
@@ -634,7 +634,7 @@ static int get_permissions_cmos(void)
if (use_dev_port) {
if ((dev_port_fd = open("/dev/port", O_RDWR)) < 0) {
- warn(_("Cannot open /dev/port"));
+ warn(_("cannot open %s"), "/dev/port");
rc = 1;
} else
rc = 0;
diff --git a/sys-utils/hwclock-rtc.c b/sys-utils/hwclock-rtc.c
index 62adc49d7..338094190 100644
--- a/sys-utils/hwclock-rtc.c
+++ b/sys-utils/hwclock-rtc.c
@@ -159,7 +159,7 @@ static int open_rtc_or_exit(void)
int rtc_fd = open_rtc();
if (rtc_fd < 0) {
- warn(_("open() of %s failed"), rtc_dev_name);
+ warn(_("cannot open %s"), rtc_dev_name);
hwclock_exit(EX_OSFILE);
}
return rtc_fd;
@@ -253,7 +253,7 @@ static int synchronize_to_clock_tick_rtc(void)
rtc_fd = open_rtc();
if (rtc_fd == -1) {
- warn(_("open() of %s failed"), rtc_dev_name);
+ warn(_("cannot open %s"), rtc_dev_name);
ret = 1;
} else {
int rc; /* Return code from ioctl */
@@ -417,7 +417,7 @@ struct clock_ops *probe_for_rtc_clock(void)
if (rtc_fd >= 0)
return &rtc;
if (debug)
- warn(_("Open of %s failed"), rtc_dev_name);
+ warn(_("cannot open %s"), rtc_dev_name);
return NULL;
}
@@ -438,7 +438,7 @@ int get_epoch_rtc(unsigned long *epoch_p, int silent)
"file %s. This file does not exist on this system."),
rtc_dev_name);
else
- warn(_("Unable to open %s"), rtc_dev_name);
+ warn(_("cannot open %s"), rtc_dev_name);
}
return 1;
}
@@ -485,7 +485,7 @@ int set_epoch_rtc(unsigned long epoch)
"file %s. This file does not exist on this system."),
rtc_dev_name);
else
- warn(_("Unable to open %s"), rtc_dev_name);
+ warn(_("cannot open %s"), rtc_dev_name);
return 1;
}
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index 332f78cd2..b4a388fd1 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -281,7 +281,7 @@ static int read_adjtime(struct adjtime *adjtime_p)
adjfile = fopen(adj_file_name, "r"); /* open file for reading */
if (adjfile == NULL) {
- warn("cannot open file %s", adj_file_name);
+ warn("cannot open %s", adj_file_name);
return EX_OSFILE;
}
diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c
index 48af8ebca..24d3d3cf1 100644
--- a/sys-utils/losetup.c
+++ b/sys-utils/losetup.c
@@ -117,7 +117,7 @@ static int set_capacity(struct loopdev_cxt *lc)
int fd = loopcxt_get_fd(lc);
if (fd < 0)
- warn(_("%s: open failed"), loopcxt_get_device(lc));
+ warn(_("cannot open %s"), loopcxt_get_device(lc));
else if (ioctl(fd, LOOP_SET_CAPACITY) != 0)
warnx(_("%s: set capacity failed"), loopcxt_get_device(lc));
else
diff --git a/sys-utils/rtcwake.c b/sys-utils/rtcwake.c
index 321f8d5f3..0e16bd388 100644
--- a/sys-utils/rtcwake.c
+++ b/sys-utils/rtcwake.c
@@ -116,7 +116,7 @@ static int is_wakeup_enabled(const char *devname)
snprintf(buf, sizeof buf, RTC_PATH, devname + strlen("/dev/"));
f = fopen(buf, "r");
if (!f) {
- warn(_("open failed: %s"), buf);
+ warn(_("cannot open %s"), buf);
return 0;
}
s = fgets(buf, sizeof buf, f);
@@ -276,7 +276,7 @@ static void suspend_system(const char *suspend)
FILE *f = fopen(SYS_POWER_STATE_PATH, "w");
if (!f) {
- warn(_("open failed: %s"), SYS_POWER_STATE_PATH);
+ warn(_("cannot open %s"), SYS_POWER_STATE_PATH);
return;
}
@@ -514,7 +514,7 @@ int main(int argc, char **argv)
fd = open(devname, O_RDONLY);
#endif
if (fd < 0)
- err(EXIT_FAILURE, _("open failed: %s"), devname);
+ err(EXIT_FAILURE, _("cannot open %s"), devname);
/* relative or absolute alarm time, normalized to time_t */
if (get_basetimes(fd) < 0)
diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c
index aec7d2e5e..c9cabc140 100644
--- a/sys-utils/swapon.c
+++ b/sys-utils/swapon.c
@@ -307,7 +307,7 @@ static int swap_rewrite_signature(const char *devname, unsigned int pagesize)
fd = open(devname, O_WRONLY);
if (fd == -1) {
- warn(_("%s: open failed"), devname);
+ warn(_("cannot open %s"), devname);
return -1;
}
@@ -474,7 +474,7 @@ static int swapon_checks(const char *special)
fd = open(special, O_RDONLY);
if (fd == -1) {
- warn(_("%s: open failed"), special);
+ warn(_("cannot open %s"), special);
goto err;
}
diff --git a/sys-utils/wdctl.c b/sys-utils/wdctl.c
index 7d31d411a..ebe55b41a 100644
--- a/sys-utils/wdctl.c
+++ b/sys-utils/wdctl.c
@@ -282,7 +282,7 @@ static int read_watchdog(struct wdinfo *wd)
if (errno == EBUSY)
warnx(_("%s: watchdog already in use, terminating."),
wd->device);
- warn(_("%s: open failed"), wd->device);
+ warn(_("cannot open %s"), wd->device);
return -1;
}
diff --git a/term-utils/script.c b/term-utils/script.c
index 5935b8516..8d7ab65f0 100644
--- a/term-utils/script.c
+++ b/term-utils/script.c
@@ -205,7 +205,7 @@ main(int argc, char **argv) {
case 't':
if (optarg)
if ((timingfd = fopen(optarg, "w")) == NULL)
- err(EXIT_FAILURE, _("cannot open timing file %s"), optarg);
+ err(EXIT_FAILURE, _("cannot open %s"), optarg);
tflg = 1;
break;
case 'V':
@@ -230,7 +230,7 @@ main(int argc, char **argv) {
die_if_link(fname);
}
if ((fscript = fopen(fname, aflg ? "a" : "w")) == NULL) {
- warn(_("open failed: %s"), fname);
+ warn(_("cannot open %s"), fname);
fail();
}
@@ -557,7 +557,7 @@ getslave(void) {
line[strlen("/dev/")] = 't';
slave = open(line, O_RDWR);
if (slave < 0) {
- warn(_("open failed: %s"), line);
+ warn(_("cannot open %s"), line);
fail();
}
tcsetattr(slave, TCSANOW, &tt);
diff --git a/term-utils/scriptreplay.c b/term-utils/scriptreplay.c
index 91c55c3c7..9aa4783c0 100644
--- a/term-utils/scriptreplay.c
+++ b/term-utils/scriptreplay.c
@@ -194,10 +194,10 @@ main(int argc, char *argv[])
tfile = fopen(tname, "r");
if (!tfile)
- err(EXIT_FAILURE, _("cannot open timing file %s"), tname);
+ err(EXIT_FAILURE, _("cannot open %s"), tname);
sfile = fopen(sname, "r");
if (!sfile)
- err(EXIT_FAILURE, _("cannot open typescript file %s"), sname);
+ err(EXIT_FAILURE, _("cannot open %s"), sname);
/* ignore the first typescript line */
while((c = fgetc(sfile)) != EOF && c != '\n');
diff --git a/term-utils/wall.c b/term-utils/wall.c
index 1f44be4c7..30324aa85 100644
--- a/term-utils/wall.c
+++ b/term-utils/wall.c
@@ -244,7 +244,7 @@ makemsg(char *fname, size_t *mbufsize, int print_banner)
fname);
if (!freopen(fname, "r", stdin))
- err(EXIT_FAILURE, _("cannot open file %s"), fname);
+ err(EXIT_FAILURE, _("cannot open %s"), fname);
}
while (fgets(lbuf, line_max, stdin)) {
diff --git a/text-utils/pg.c b/text-utils/pg.c
index 0bd827981..9ade866ed 100644
--- a/text-utils/pg.c
+++ b/text-utils/pg.c
@@ -1310,7 +1310,7 @@ found_bw:
save = fopen(p, "wb");
if (save == NULL) {
cmd.count = errno;
- mesg(_("Cannot open "));
+ mesg(_("cannot open "));
mesg(p);
mesg(": ");
mesg(strerror(cmd.count));
diff --git a/text-utils/rev.c b/text-utils/rev.c
index 3c64c12d1..a44f9c6eb 100644
--- a/text-utils/rev.c
+++ b/text-utils/rev.c
@@ -128,7 +128,7 @@ int main(int argc, char *argv[])
do {
if (*argv) {
if ((fp = fopen(*argv, "r")) == NULL) {
- warn(_("%s: open failed"), *argv );
+ warn(_("cannot open %s"), *argv );
rval = EXIT_FAILURE;
++argv;
continue;
diff --git a/text-utils/tailf.c b/text-utils/tailf.c
index 9e77a2f09..e27a14d3e 100644
--- a/text-utils/tailf.c
+++ b/text-utils/tailf.c
@@ -59,7 +59,7 @@ tailf(const char *filename, int lines)
int i;
if (!(str = fopen(filename, "r")))
- err(EXIT_FAILURE, _("cannot open \"%s\" for read"), filename);
+ err(EXIT_FAILURE, _("cannot open %s"), filename);
buf = xmalloc((lines ? lines : 1) * BUFSIZ);
p = buf;
@@ -96,7 +96,7 @@ roll_file(const char *filename, off_t *size)
fd = open(filename, O_RDONLY);
if (fd < 0)
- err(EXIT_FAILURE, _("cannot open \"%s\" for read"), filename);
+ err(EXIT_FAILURE, _("cannot open %s"), filename);
if (fstat(fd, &st) == -1)
err(EXIT_FAILURE, _("stat failed %s"), filename);
diff --git a/text-utils/ul.c b/text-utils/ul.c
index d08ca9a11..80bc7a12e 100644
--- a/text-utils/ul.c
+++ b/text-utils/ul.c
@@ -228,7 +228,7 @@ int main(int argc, char **argv)
for (; optind < argc; optind++) {
f = fopen(argv[optind],"r");
if (!f)
- err(EXIT_FAILURE, _("%s: open failed"),
+ err(EXIT_FAILURE, _("cannot open %s"),
argv[optind]);
filter(f);
fclose(f);