]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/options.c
Close the device fd in device_script() if the channel plugin doesn't
[ppp.git] / pppd / options.c
index 7f4f5eb80af4d68004811a868b4f11e9c7651119..735f08ecb5d83d809e0109f7a86078364d71a7f4 100644 (file)
@@ -40,7 +40,7 @@
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#define RCSID  "$Id: options.c,v 1.90 2002/12/04 23:03:32 paulus Exp $"
+#define RCSID  "$Id: options.c,v 1.92 2004/01/13 04:02:07 paulus Exp $"
 
 #include <ctype.h>
 #include <stdio.h>
@@ -487,8 +487,8 @@ options_for_tty()
     size_t pl;
 
     dev = devnam;
-    if (strncmp(dev, "/dev/", 5) == 0)
-       dev += 5;
+    if ((p = strstr(dev, "/dev/")) != NULL)
+       dev = p + 5;
     if (dev[0] == 0 || strcmp(dev, "tty") == 0)
        return 1;               /* don't look for /etc/ppp/options.tty */
     pl = strlen(_PATH_TTYOPT) + strlen(dev) + 1;
@@ -1483,7 +1483,6 @@ setdomain(argv)
     return (1);
 }
 
-
 static int
 setlogfile(argv)
     char **argv;
@@ -1511,6 +1510,7 @@ setlogfile(argv)
     log_default = 0;
     return 1;
 }
+
 #ifdef MAXOCTETS
 static int
 setmodir(argv)