3 @@ -203,7 +203,7 @@ static int driver_is_old = 0;
4 static int restore_term = 0; /* 1 => we've munged the terminal */
5 static struct termios inittermios; /* Initial TTY termios */
7 -int new_style_driver = 0;
8 +static const int new_style_driver = 1;
10 static char loop_name[20];
11 static unsigned char inbuf[512]; /* buffer for chars read from loopback */
12 @@ -220,8 +220,8 @@ static int looped; /* 1 if using loop
13 static int link_mtu; /* mtu for the link (not bundle) */
15 static struct utsname utsname; /* for the kernel version */
16 -static int kernel_version;
17 #define KVERSION(j,n,p) ((j)*1000000 + (n)*1000 + (p))
18 +static const int kernel_version = KVERSION(2,6,37);
22 @@ -1414,11 +1414,12 @@ int ccp_fatal_error (int unit)
24 * path_to_procfs - find the path to the proc file system mount point
26 -static char proc_path[MAXPATHLEN];
27 -static int proc_path_len;
28 +static char proc_path[MAXPATHLEN] = "/proc";
29 +static int proc_path_len = 5;
31 static char *path_to_procfs(const char *tail)
34 struct mntent *mntent;
37 @@ -1440,6 +1441,7 @@ static char *path_to_procfs(const char *
43 strlcpy(proc_path + proc_path_len, tail,
44 sizeof(proc_path) - proc_path_len);
45 @@ -2098,11 +2100,13 @@ int ppp_available(void)
46 "ppp.o exists in /lib/modules/`uname -r`/net.\n"
47 "See README.linux file in the ppp distribution for more details.\n";
50 /* get the kernel version now, since we are called before sys_init */
52 osmaj = osmin = ospatch = 0;
53 sscanf(utsname.release, "%d.%d.%d", &osmaj, &osmin, &ospatch);
54 kernel_version = KVERSION(osmaj, osmin, ospatch);
57 fd = open("/dev/ppp", O_RDWR);
59 @@ -2121,7 +2125,9 @@ int ppp_available(void)
67 /* XXX should get from driver */
69 @@ -2168,6 +2174,7 @@ int ppp_available(void)
71 if (ok && ((ifr.ifr_hwaddr.sa_family & ~0xFF) != ARPHRD_PPP))
76 * This is the PPP device. Validate the version of the driver at this
77 @@ -2659,6 +2666,7 @@ get_pty(master_fdp, slave_fdp, slave_nam
83 /* the old way - scan through the pty name space */
84 for (i = 0; i < 64; ++i) {
85 @@ -2677,6 +2685,7 @@ get_pty(master_fdp, slave_fdp, slave_nam