]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/main.c
devname -> devnam
[ppp.git] / pppd / main.c
index 6ec6eab29323094193a6782a19cec58ba6e73dad..35bc8ea4b27e57157084b65ccffd88f16a6869d3 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
  */
 
 #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>
 #endif
 
 #include <stdio.h>
@@ -99,7 +99,7 @@ static pid_t  pid;            /* Our pid */
 static pid_t   pgrpid;         /* Process Group ID */
 uid_t uid;                     /* Our real user-id */
 
 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 */
 int default_device = TRUE;     /* use default device (stdin/out) */
 
 int fd = -1;                   /* Device file descriptor */
@@ -208,7 +208,7 @@ main(argc, argv)
 
     p = ttyname(0);
     if (p)
 
     p = ttyname(0);
     if (p)
-       strcpy(devname, p);
+       strcpy(devnam, p);
   
     if (gethostname(hostname, MAXNAMELEN) < 0 ) {
        perror("couldn't get hostname");
   
     if (gethostname(hostname, MAXNAMELEN) < 0 ) {
        perror("couldn't get hostname");
@@ -316,7 +316,7 @@ main(argc, argv)
      * Lock the device if we've been asked to.
      */
     if (lockflag && !default_device)
      * Lock the device if we've been asked to.
      */
     if (lockflag && !default_device)
-       if (lock(devname) < 0)
+       if (lock(devnam) < 0)
            die(1);
 
     do {
            die(1);
 
     do {
@@ -324,8 +324,8 @@ main(argc, argv)
        /*
         * Open the serial device and set it up to be the ppp interface.
         */
        /*
         * 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;
            die(1);
        }
        hungup = 0;
@@ -391,7 +391,7 @@ main(argc, argv)
         * Block all signals, start opening the connection, and wait for
         * incoming events (reply, timeout, etc.).
         */
         * 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; ) {
        lcp_lowerup(0);
        lcp_open(0);            /* Start protocol */
        for (phase = PHASE_ESTABLISH; phase != PHASE_DEAD; ) {