Don't prefix error messages with the program name

Do not escape error codes/error messages for no reason.
This commit is contained in:
sin 2014-04-11 23:45:49 +01:00
parent f308a58740
commit 1392fce27a
2 changed files with 5 additions and 5 deletions

6
chvt.c
View File

@ -46,12 +46,12 @@ main(int argc, char *argv[])
close(fd);
}
eprintf("chvt: couldn't find a console.\n");
eprintf("couldn't find a console.\n");
VTfound:
if(ioctl(fd, VT_ACTIVATE, n) == -1)
eprintf("chvt: VT_ACTIVATE '%d':", n);
eprintf("VT_ACTIVATE %d:", n);
if(ioctl(fd, VT_WAITACTIVE, n) == -1)
eprintf("chvt: VT_WAITACTIVE '%d':", n);
eprintf("VT_WAITACTIVE %d:", n);
close(fd);
return EXIT_SUCCESS;

4
who.c
View File

@ -28,7 +28,7 @@ main(int argc, char **argv)
mflag = 1;
tty = ttyname(STDIN_FILENO);
if (!tty)
eprintf("who: stdin:");
eprintf("ttyname: stdin:");
if ((ttmp = strrchr(tty, '/')))
tty = ttmp+1;
break;
@ -43,7 +43,7 @@ main(int argc, char **argv)
usage();
if (!(ufp = fopen("/var/run/utmp", "r")))
eprintf("who: '%s':", "/var/run/utmp");
eprintf("fopen: %s:", "/var/run/utmp");
while(fread(&usr, sizeof(usr), 1, ufp) == 1) {
if (!*usr.ut_name || !*usr.ut_line ||