*/
#ifndef lint
-static char rcsid[] = "$Id: main.c,v 1.14 1994/08/09 06:27:52 paulus Exp $";
+static char rcsid[] = "$Id: main.c,v 1.15 1994/08/22 00:40:48 paulus Exp $";
#endif
#include <stdio.h>
static pid_t pgrpid; /* Process Group ID */
uid_t uid; /* Our real user-id */
-char devname[MAXPATHLEN] = "/dev/tty"; /* Device name */
+char devnam[MAXPATHLEN] = "/dev/tty"; /* Device name */
int default_device = TRUE; /* use default device (stdin/out) */
int fd = -1; /* Device file descriptor */
p = ttyname(0);
if (p)
- strcpy(devname, p);
+ strcpy(devnam, p);
if (gethostname(hostname, MAXNAMELEN) < 0 ) {
perror("couldn't get hostname");
* Lock the device if we've been asked to.
*/
if (lockflag && !default_device)
- if (lock(devname) < 0)
+ if (lock(devnam) < 0)
die(1);
do {
/*
* Open the serial device and set it up to be the ppp interface.
*/
- if ((fd = open(devname, O_RDWR, 0)) < 0) {
- syslog(LOG_ERR, "open(%s): %m", devname);
+ if ((fd = open(devnam, O_RDWR, 0)) < 0) {
+ syslog(LOG_ERR, "open(%s): %m", devnam);
die(1);
}
hungup = 0;
* Block all signals, start opening the connection, and wait for
* incoming events (reply, timeout, etc.).
*/
- syslog(LOG_NOTICE, "Connect: %s <--> %s", ifname, devname);
+ syslog(LOG_NOTICE, "Connect: %s <--> %s", ifname, devnam);
lcp_lowerup(0);
lcp_open(0); /* Start protocol */
for (phase = PHASE_ESTABLISH; phase != PHASE_DEAD; ) {