summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--disk-utils/fsck.c2
-rw-r--r--disk-utils/fsck.cramfs.c14
-rw-r--r--lib/path.c8
-rw-r--r--login-utils/last.c8
-rw-r--r--login-utils/sulogin.c2
-rw-r--r--sys-utils/setpriv.c2
6 files changed, 18 insertions, 18 deletions
diff --git a/disk-utils/fsck.c b/disk-utils/fsck.c
index 19eabe349..00622c428 100644
--- a/disk-utils/fsck.c
+++ b/disk-utils/fsck.c
@@ -304,7 +304,7 @@ static int is_irrotational_disk(dev_t disk)
rc = fscanf(f, "%d", &x);
if (rc != 1) {
if (ferror(f))
- warn(_("failed to read: %s"), path);
+ warn(_("cannot read %s"), path);
else
warnx(_("parse error: %s"), path);
}
diff --git a/disk-utils/fsck.cramfs.c b/disk-utils/fsck.cramfs.c
index 3c861d57d..cd23345e3 100644
--- a/disk-utils/fsck.cramfs.c
+++ b/disk-utils/fsck.cramfs.c
@@ -166,14 +166,14 @@ static void test_super(int *start, size_t * length)
/* find superblock */
if (read(fd, &super, sizeof(super)) != sizeof(super))
- err(FSCK_EX_ERROR, _("read failed: %s"), filename);
+ err(FSCK_EX_ERROR, _("cannot read %s"), filename);
if (get_superblock_endianness(super.magic) != -1)
*start = 0;
else if (*length >= (PAD_SIZE + sizeof(super))) {
if (lseek(fd, PAD_SIZE, SEEK_SET) == (off_t) -1)
- err(FSCK_EX_ERROR, _("seek failed: %s"), filename);
+ err(FSCK_EX_ERROR, _("seek on %s failed"), filename);
if (read(fd, &super, sizeof(super)) != sizeof(super))
- err(FSCK_EX_ERROR, _("read failed: %s"), filename);
+ err(FSCK_EX_ERROR, _("cannot read %s"), filename);
if (get_superblock_endianness(super.magic) != -1)
*start = PAD_SIZE;
else
@@ -228,9 +228,9 @@ static void test_crc(int start)
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
if (buf != MAP_FAILED) {
if (lseek(fd, 0, SEEK_SET) == (off_t) -1)
- err(FSCK_EX_ERROR, _("seek failed: %s"), filename);
+ err(FSCK_EX_ERROR, _("seek on %s failed"), filename);
if (read(fd, buf, super.size) < 0)
- err(FSCK_EX_ERROR, _("read failed: %s"), filename);
+ err(FSCK_EX_ERROR, _("cannot read %s"), filename);
}
}
if (buf != MAP_FAILED) {
@@ -244,11 +244,11 @@ static void test_crc(int start)
buf = xmalloc(4096);
if (lseek(fd, start, SEEK_SET) == (off_t) -1)
- err(FSCK_EX_ERROR, _("seek failed: %s"), filename);
+ err(FSCK_EX_ERROR, _("seek on %s failed"), filename);
for (;;) {
retval = read(fd, buf, 4096);
if (retval < 0)
- err(FSCK_EX_ERROR, _("read failed: %s"), filename);
+ err(FSCK_EX_ERROR, _("cannot read %s"), filename);
else if (retval == 0)
break;
if (length == 0)
diff --git a/lib/path.c b/lib/path.c
index 7a68d9fe2..1f7e25806 100644
--- a/lib/path.c
+++ b/lib/path.c
@@ -97,7 +97,7 @@ path_read_str(char *result, size_t len, const char *path, ...)
va_end(ap);
if (!fgets(result, len, fd))
- err(EXIT_FAILURE, _("failed to read: %s"), pathbuf);
+ err(EXIT_FAILURE, _("cannot read %s"), pathbuf);
fclose(fd);
len = strlen(result);
@@ -118,7 +118,7 @@ path_read_s32(const char *path, ...)
if (fscanf(fd, "%d", &result) != 1) {
if (ferror(fd))
- err(EXIT_FAILURE, _("failed to read: %s"), pathbuf);
+ err(EXIT_FAILURE, _("cannot read %s"), pathbuf);
else
errx(EXIT_FAILURE, _("parse error: %s"), pathbuf);
}
@@ -139,7 +139,7 @@ path_read_u64(const char *path, ...)
if (fscanf(fd, "%"SCNu64, &result) != 1) {
if (ferror(fd))
- err(EXIT_FAILURE, _("failed to read: %s"), pathbuf);
+ err(EXIT_FAILURE, _("cannot read %s"), pathbuf);
else
errx(EXIT_FAILURE, _("parse error: %s"), pathbuf);
}
@@ -187,7 +187,7 @@ path_cpuparse(int maxcpus, int islist, const char *path, va_list ap)
fd = path_vfopen("r" UL_CLOEXECSTR, 1, path, ap);
if (!fgets(buf, len, fd))
- err(EXIT_FAILURE, _("failed to read: %s"), pathbuf);
+ err(EXIT_FAILURE, _("cannot read %s"), pathbuf);
fclose(fd);
len = strlen(buf);
diff --git a/login-utils/last.c b/login-utils/last.c
index 8da42bafb..5550dcb3f 100644
--- a/login-utils/last.c
+++ b/login-utils/last.c
@@ -186,12 +186,12 @@ static int uread(const struct last_control *ctl, FILE *fp, struct utmp *u,
return 0;
o = ((fpos - 1) / UCHUNKSIZE) * UCHUNKSIZE;
if (fseeko(fp, o, SEEK_SET) < 0) {
- warn(_("seek failed: %s"), ctl->altv[ctl->alti]);
+ warn(_("seek on %s failed"), ctl->altv[ctl->alti]);
return 0;
}
bpos = (int)(fpos - o);
if (fread(buf, bpos, 1, fp) != 1) {
- warn(_("read failed: %s"), ctl->altv[ctl->alti]);
+ warn(_("cannot read %s"), ctl->altv[ctl->alti]);
return 0;
}
fpos = o;
@@ -220,7 +220,7 @@ static int uread(const struct last_control *ctl, FILE *fp, struct utmp *u,
*/
memcpy(tmp + (-bpos), buf, utsize + bpos);
if (fseeko(fp, fpos, SEEK_SET) < 0) {
- warn(_("seek failed: %s"), ctl->altv[ctl->alti]);
+ warn(_("seek on %s failed"), ctl->altv[ctl->alti]);
return 0;
}
@@ -228,7 +228,7 @@ static int uread(const struct last_control *ctl, FILE *fp, struct utmp *u,
* Read another UCHUNKSIZE bytes.
*/
if (fread(buf, UCHUNKSIZE, 1, fp) != 1) {
- warn(_("read failed: %s"), ctl->altv[ctl->alti]);
+ warn(_("cannot read %s"), ctl->altv[ctl->alti]);
return 0;
}
diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c
index 352c7818e..4560ee0fb 100644
--- a/login-utils/sulogin.c
+++ b/login-utils/sulogin.c
@@ -602,7 +602,7 @@ static char *getpasswd(struct console *con)
case ENOENT:
break;
default:
- warn(_("%s: read failed"), con->tty);
+ warn(_("cannot read %s"), con->tty);
break;
}
goto quit;
diff --git a/sys-utils/setpriv.c b/sys-utils/setpriv.c
index a5727361a..c3f2a8b82 100644
--- a/sys-utils/setpriv.c
+++ b/sys-utils/setpriv.c
@@ -230,7 +230,7 @@ static void dump_label(const char *name)
close(fd);
if (len < 0) {
errno = e;
- warn(_("read failed: %s"), name);
+ warn(_("cannot read %s"), name);
return;
}
if (sizeof(buf) - 1 <= (size_t)len) {