summaryrefslogtreecommitdiffstats
path: root/login-utils/sulogin.c
diff options
context:
space:
mode:
authorSami Kerola2012-07-15 10:39:57 +0200
committerKarel Zak2012-07-16 18:18:22 +0200
commit289dcc90234680063a336925a99d1ef04e97cbda (patch)
treecb8656c16143daa406ea9d706406ca12d94d89d3 /login-utils/sulogin.c
parenttranslation: unify stat error messages (diff)
downloadkernel-qcow2-util-linux-289dcc90234680063a336925a99d1ef04e97cbda.tar.gz
kernel-qcow2-util-linux-289dcc90234680063a336925a99d1ef04e97cbda.tar.xz
kernel-qcow2-util-linux-289dcc90234680063a336925a99d1ef04e97cbda.zip
translation: unify file open error messages
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'login-utils/sulogin.c')
-rw-r--r--login-utils/sulogin.c8
1 files changed, 4 insertions, 4 deletions
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);