diff options
author | Benno Schulenberg | 2013-10-08 17:04:22 +0200 |
---|---|---|
committer | Karel Zak | 2013-10-09 11:37:38 +0200 |
commit | 47481cbd01819a6f387f6a2537f8ff1e4449deb0 (patch) | |
tree | 6dfafa51f6b490e329021a3d3acd7b39e1acdfb6 /login-utils | |
parent | tests: use 'btrfs' rather than 'btrfsctl' (diff) | |
download | kernel-qcow2-util-linux-47481cbd01819a6f387f6a2537f8ff1e4449deb0.tar.gz kernel-qcow2-util-linux-47481cbd01819a6f387f6a2537f8ff1e4449deb0.tar.xz kernel-qcow2-util-linux-47481cbd01819a6f387f6a2537f8ff1e4449deb0.zip |
textual: standardize some "cannot read" and "seek failed" error messages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Diffstat (limited to 'login-utils')
-rw-r--r-- | login-utils/last.c | 8 | ||||
-rw-r--r-- | login-utils/sulogin.c | 2 |
2 files changed, 5 insertions, 5 deletions
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; |