*/
#ifndef lint
-static char rcsid[] = "$Id: sys-NeXT.c,v 1.16 1999/03/19 04:23:46 paulus Exp $";
+static char rcsid[] = "$Id: sys-NeXT.c,v 1.18 1999/04/12 06:24:48 paulus Exp $";
#endif
#include <stdio.h>
static int restore_term; /* 1 => we've munged the terminal */
static struct termios inittermios; /* Initial TTY termios */
-static char *lock_file;
-
static int sockfd; /* socket for doing interface ioctls */
static int pppdev; /* +++ */
return -1;
}
-
+#if 0
/*
* daemon - Detach us from the terminal session.
*/
}
return 0;
}
-
+#endif
char *
strdup(s)
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);
close(fd);
}
+#if 0
/*
* Routines for locking and unlocking the serial device, moved here
* from chat.c.
#define LOCK_PREFIX "/usr/spool/uucp/LCK/LCK.."
+static char *lock_file;
+
/*
* lock - create a lock file for the named device
*/
lock_file = NULL;
}
}
+#endif
#if defined(i386) && defined(HAS_BROKEN_IOCTL)
int
int
get_ppp_stats(u, stats)
int u;
- struct ppp_stats *stats;
+ struct pppd_stats *stats;
{
struct ifpppstatsreq req;
error("Couldn't get PPP statistics: %m");
return 0;
}
- *stats = req.stats;
+ stats->bytes_in = req.stats.p.ppp_ibytes;
+ stats->bytes_out = req.stats.p.ppp_obytes;
return 1;
}