Print errors on the next line

This commit is contained in:
sin 2014-06-05 17:16:35 +01:00
parent f628b72747
commit 2ea51e8cd8
2 changed files with 2 additions and 0 deletions

View File

@ -68,6 +68,7 @@ main(int argc, char *argv[])
ioctl(STDIN_FILENO, TCFLSH, (void *)0); ioctl(STDIN_FILENO, TCFLSH, (void *)0);
pass = getpass("Password: "); pass = getpass("Password: ");
putchar('\n');
if (!pass) if (!pass)
eprintf("getpass:"); eprintf("getpass:");

1
su.c
View File

@ -76,6 +76,7 @@ main(int argc, char *argv[])
uid = getuid(); uid = getuid();
if (uid) { if (uid) {
pass = getpass("Password: "); pass = getpass("Password: ");
putchar('\n');
if (!pass) if (!pass)
eprintf("getpass:"); eprintf("getpass:");
} }