X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fsys-sunos4.c;h=19c233ff7e3f6d8a21020e1a08b8d0e6e5f91cc4;hp=ea3deeb36ae5ddeaaa99afb5e986f48292f463c3;hb=31b4bba68d46b38119fd8620ee09ff7f8831f4b5;hpb=093489a1ce40a2075b1c5c9feb03c7ab1659d884 diff --git a/pppd/sys-sunos4.c b/pppd/sys-sunos4.c index ea3deeb..19c233f 100644 --- a/pppd/sys-sunos4.c +++ b/pppd/sys-sunos4.c @@ -25,9 +25,7 @@ * OR MODIFICATIONS. */ -#ifndef lint -static char rcsid[] = "$Id: sys-sunos4.c,v 1.19 1999/04/01 07:20:11 paulus Exp $"; -#endif +#define RCSID "$Id: sys-sunos4.c,v 1.24 1999/08/13 06:46:19 paulus Exp $" #include #include @@ -67,6 +65,8 @@ extern void *alloca(); #endif #endif /*sparc*/ +static const char rcsid[] = RCSID; + static int pppfd; static int fdmuxid = -1; static int iffd; @@ -201,7 +201,7 @@ sys_check_options() return 1; } - +#if 0 /* * daemon - Detach us from controlling terminal session. */ @@ -225,6 +225,7 @@ daemon(nochdir, noclose) } return 0; } +#endif /* * ppp_available - check whether the system has any ppp interfaces @@ -702,7 +703,7 @@ read_packet(buf) flags = 0; len = getmsg(pppfd, &ctrl, &data, &flags); if (len < 0) { - if (errno = EAGAIN || errno == EINTR) + if (errno == EAGAIN || errno == EINTR) return -1; fatal("Error reading packet: %m"); } @@ -1271,9 +1272,9 @@ logwtmp(line, name, host) if ((fd = open(WTMPFILE, O_WRONLY|O_APPEND, 0)) < 0) return; if (!fstat(fd, &buf)) { - strlcpy(ut.ut_line, line, sizeof(ut.ut_line)); - strlcpy(ut.ut_name, name, sizeof(ut.ut_name)); - strlcpy(ut.ut_host, host, sizeof(ut.ut_host)); + strncpy(ut.ut_line, line, sizeof(ut.ut_line)); + strncpy(ut.ut_name, name, sizeof(ut.ut_name)); + strncpy(ut.ut_host, host, sizeof(ut.ut_host)); (void)time(&ut.ut_time); if (write(fd, (char *)&ut, sizeof(struct utmp)) != sizeof(struct utmp)) (void)ftruncate(fd, buf.st_size); @@ -1376,6 +1377,7 @@ get_host_seed() return gethostid(); } +#if 0 /* * Code for locking/unlocking the serial device. * This code is derived from chat.c. @@ -1479,6 +1481,7 @@ unlock() lock_file = NULL; } } +#endif /* lock stuff removed */ /* * get_pty - get a pty master/slave pair and chown the slave side