From: Paul Mackerras Date: Tue, 13 Jan 2004 04:02:07 +0000 (+0000) Subject: Invoke options.ttyxx even if the dev directory isn't at the root X-Git-Tag: ppp-2.4.7~260 X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=739c7d957d0d5e86a9fecfd8b0bfc4250e910f9b;hp=ea0c6c5be54c2fdada12e2c1e5292dee9b12b9ac Invoke options.ttyxx even if the dev directory isn't at the root (e.g. if the tty device is /ram1/dev/ttyS0). Patch sent in by Marco d'Itri. --- diff --git a/pppd/options.c b/pppd/options.c index b8a2103..735f08e 100644 --- a/pppd/options.c +++ b/pppd/options.c @@ -40,7 +40,7 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define RCSID "$Id: options.c,v 1.91 2003/03/03 05:11:46 paulus Exp $" +#define RCSID "$Id: options.c,v 1.92 2004/01/13 04:02:07 paulus Exp $" #include #include @@ -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;