X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fsys-ultrix.c;h=7fc4034e6b0cdecc568909eac88f98376faa45e9;hp=06c6f4f41e77cc132bb3ac3b442ef5eba8099de5;hb=bc45bd7903b4439e920bc2095b7543dc768f7ff8;hpb=e46557418647a48bb018edf58a2bdb6ff9e57ef6 diff --git a/pppd/sys-ultrix.c b/pppd/sys-ultrix.c index 06c6f4f..7fc4034 100644 --- a/pppd/sys-ultrix.c +++ b/pppd/sys-ultrix.c @@ -19,7 +19,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sys-ultrix.c,v 1.12 1995/06/30 00:40:06 paulus Exp $"; +static char rcsid[] = "$Id: sys-ultrix.c,v 1.14 1995/08/11 02:36:26 paulus Exp $"; #endif /* @@ -52,6 +52,7 @@ static int initdisc = -1; /* Initial TTY discipline */ static int restore_term; /* 1 => we've munged the terminal */ static struct termios inittermios; /* Initial TTY termios */ +static struct winsize wsinfo; /* Initial window size info */ static char *lock_file; @@ -336,8 +337,10 @@ set_up_tty(fd, local) die(1); } - if (!restore_term) + if (!restore_term) { inittermios = tios; + ioctl(fd, TIOCGWINSZ, &wsinfo); + } tios.c_cflag &= ~(CSIZE | CSTOPB | PARENB | CLOCAL); #ifdef CRTSCTS @@ -413,6 +416,7 @@ restore_tty() if (tcsetattr(fd, TCSAFLUSH, &inittermios) < 0) if (errno != ENXIO) syslog(LOG_WARNING, "tcsetattr: %m"); + ioctl(fd, TIOCSWINSZ, &wsinfo); restore_term = FALSE; } } @@ -909,9 +913,8 @@ get_ether_addr(ipaddr, hwaddr) u_int32_t ipaddr; struct sockaddr *hwaddr; { - struct ifreq *ifr, *ifend, *ifp; + struct ifreq *ifr, *ifend; u_int32_t ina, mask; - struct sockaddr_dl *dla; struct ifreq ifreq; struct ifconf ifc; struct ifreq ifs[MAX_IFS];