diff options
author | Ned Ludd <solar@gentoo.org> | 2004-10-02 21:24:23 +0000 |
---|---|---|
committer | Ned Ludd <solar@gentoo.org> | 2004-10-02 21:24:23 +0000 |
commit | 903f5f7eb45c481cdfe3fc4e6a04f63da061120a (patch) | |
tree | 722f5240a05d82e24d7dc84597029bd176127402 /net-dialup/mingetty/files | |
parent | Keyword ~alpha, requested in bug 64485. (diff) | |
download | historical-903f5f7eb45c481cdfe3fc4e6a04f63da061120a.tar.gz historical-903f5f7eb45c481cdfe3fc4e6a04f63da061120a.tar.bz2 historical-903f5f7eb45c481cdfe3fc4e6a04f63da061120a.zip |
replaced legacy interface sys_errlist[errno] with strerror(errno)
Diffstat (limited to 'net-dialup/mingetty/files')
-rw-r--r-- | net-dialup/mingetty/files/mingetty-1.00-strerror.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/net-dialup/mingetty/files/mingetty-1.00-strerror.patch b/net-dialup/mingetty/files/mingetty-1.00-strerror.patch new file mode 100644 index 000000000000..a3ec9e136ef2 --- /dev/null +++ b/net-dialup/mingetty/files/mingetty-1.00-strerror.patch @@ -0,0 +1,52 @@ +--- mingetty-1.00/mingetty.c.orig 2004-10-02 21:13:08.000000000 +0000 ++++ mingetty-1.00/mingetty.c 2004-10-02 21:13:52.000000000 +0000 +@@ -193,7 +193,7 @@ + strcpy (buf, "/dev/"); + strcat (buf, tty); + if (chown (buf, 0, 0) || chmod (buf, 0600)) +- error ("%s: %s", buf, sys_errlist[errno]); ++ error ("%s: %s", buf, strerror(errno)); + + sa.sa_handler = SIG_IGN; + sa.sa_flags = 0; +@@ -208,7 +208,7 @@ + */ + if ((fd = open (buf, O_RDWR, 0)) < 0 + || ioctl (fd, TIOCSCTTY, (void *)1) == -1) +- error ("%s: cannot open tty: %s", buf, sys_errlist[errno]); ++ error ("%s: cannot open tty: %s", buf, strerror(errno)); + if (!isatty (fd)) + error ("%s: not a tty", buf); + +@@ -222,11 +222,11 @@ + + if (open (buf, O_RDWR, 0) != 0) + error ("%s: cannot open as standard input: %s", buf, +- sys_errlist[errno]); ++ strerror(errno)); + + /* Set up standard output and standard error file descriptors. */ + if (dup (0) != 1 || dup (0) != 2) +- error ("%s: dup problem: %s", buf, sys_errlist[errno]); ++ error ("%s: dup problem: %s", buf, strerror(errno)); + + /* Write a reset string to the terminal. This is very linux-specific + and should be checked for other systems. */ +@@ -377,7 +377,7 @@ + if (errno == EINTR || errno == EIO + || errno == ENOENT) + exit (0); +- error ("%s: read: %s", tty, sys_errlist[errno]); ++ error ("%s: read: %s", tty, strerror(errno)); + } + if (c == '\n' || c == '\r') { + *bp = 0; +@@ -517,7 +517,7 @@ + while ((logname = get_logname ()) == 0) ; + execl (_PATH_LOGIN, _PATH_LOGIN, "--", logname, NULL); + } +- error ("%s: can't exec " _PATH_LOGIN ": %s", tty, sys_errlist[errno]); ++ error ("%s: can't exec " _PATH_LOGIN ": %s", tty, strerror(errno)); + exit (0); + } + |