From: Paul Mackerras Date: Mon, 22 Aug 1994 00:40:48 +0000 (+0000) Subject: devname -> devnam X-Git-Tag: RELEASE_2_3_6~902 X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=eff1bf74317aeed1a98d141f8cf0aec6c8756162;ds=sidebyside devname -> devnam --- diff --git a/pppd/auth.c b/pppd/auth.c index a8e5004..c4ea415 100644 --- a/pppd/auth.c +++ b/pppd/auth.c @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: auth.c,v 1.7 1994/08/09 06:29:14 paulus Exp $"; +static char rcsid[] = "$Id: auth.c,v 1.8 1994/08/22 00:36:38 paulus Exp $"; #endif #include @@ -79,7 +79,7 @@ struct wordlist { extern char user[]; extern char passwd[]; -extern char devname[]; +extern char devnam[]; extern char our_name[]; extern char remote_name[]; extern char hostname[]; @@ -426,7 +426,7 @@ check_passwd(unit, auser, userlen, apasswd, passwdlen, msg, msglen) */ if (attempts++ >= 10) { syslog(LOG_WARNING, "%d LOGIN FAILURES ON %s, %s", - attempts, devname, user); + attempts, devnam, user); quit(); } if (attempts > 3) @@ -488,9 +488,9 @@ login(user, passwd, msg, msglen) /* * Write a wtmp entry for this user. */ - tty = strrchr(devname, '/'); + tty = strrchr(devnam, '/'); if (tty == NULL) - tty = devname; + tty = devnam; else tty++; logwtmp(tty, user, ""); /* Add wtmp login entry */ @@ -507,9 +507,9 @@ logout() { char *tty; - tty = strrchr(devname, '/'); + tty = strrchr(devnam, '/'); if (tty == NULL) - tty = devname; + tty = devnam; else tty++; logwtmp(tty, "", ""); /* Wipe out wtmp logout entry */ diff --git a/pppd/ipcp.c b/pppd/ipcp.c index 6c9abb1..8e20c52 100644 --- a/pppd/ipcp.c +++ b/pppd/ipcp.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: ipcp.c,v 1.8 1994/05/26 06:37:34 paulus Exp $"; +static char rcsid[] = "$Id: ipcp.c,v 1.9 1994/08/22 00:36:38 paulus Exp $"; #endif /* @@ -44,7 +44,7 @@ ipcp_options ipcp_allowoptions[NPPP]; /* Options we allow peer to request */ ipcp_options ipcp_hisoptions[NPPP]; /* Options that we ack'd */ extern char ifname[]; -extern char devname[]; +extern char devnam[]; extern int baud_rate; /* local vars */ @@ -1083,7 +1083,7 @@ ipcp_script(f, script) argv[0] = script; argv[1] = ifname; - argv[2] = devname; + argv[2] = devnam; argv[3] = strspeed; argv[4] = strlocal; argv[5] = strremote; diff --git a/pppd/main.c b/pppd/main.c index 6ec6eab..35bc8ea 100644 --- a/pppd/main.c +++ b/pppd/main.c @@ -18,7 +18,7 @@ */ #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 @@ -99,7 +99,7 @@ static pid_t pid; /* Our pid */ 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 */ @@ -208,7 +208,7 @@ main(argc, argv) p = ttyname(0); if (p) - strcpy(devname, p); + strcpy(devnam, p); 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) - if (lock(devname) < 0) + if (lock(devnam) < 0) die(1); do { @@ -324,8 +324,8 @@ main(argc, argv) /* * 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; @@ -391,7 +391,7 @@ main(argc, argv) * 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; ) { diff --git a/pppd/options.c b/pppd/options.c index d58c850..c7c4b4e 100644 --- a/pppd/options.c +++ b/pppd/options.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: options.c,v 1.11 1994/08/09 06:29:14 paulus Exp $"; +static char rcsid[] = "$Id: options.c,v 1.12 1994/08/22 00:36:38 paulus Exp $"; #endif #include @@ -54,7 +54,7 @@ char *strdup __ARGS((char *)); #endif #ifndef GIDSET_TYPE -#define GIDSET_TYPE int +#define GIDSET_TYPE gid_t #endif /* @@ -141,7 +141,7 @@ extern int nodetach; extern char *connector; extern char *disconnector; extern int inspeed; -extern char devname[]; +extern char devnam[]; extern int default_device; extern u_long netmask; extern int detach; @@ -430,9 +430,9 @@ options_for_tty() char *dev, *path; int ret; - dev = strrchr(devname, '/'); + dev = strrchr(devnam, '/'); if (dev == NULL) - dev = devname; + dev = devnam; else ++dev; if (strcmp(dev, "tty") == 0) @@ -1069,8 +1069,8 @@ setdevname(cp) return -1; } - (void) strncpy(devname, cp, MAXPATHLEN); - devname[MAXPATHLEN-1] = 0; + (void) strncpy(devnam, cp, MAXPATHLEN); + devnam[MAXPATHLEN-1] = 0; default_device = FALSE; return 1;