diff options
author | brian <brian@FreeBSD.org> | 1999-04-27 00:23:57 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-04-27 00:23:57 +0000 |
commit | 9a2c03d6d76e5e3efcf4e4fd7ffd836059d91408 (patch) | |
tree | 2544e9ba2af3cbfd7749f4d13a043c59f31c0890 /usr.sbin/ppp/physical.c | |
parent | 37aa35f17ea62e5c9e35c2d79271bb178d428de8 (diff) | |
download | FreeBSD-src-9a2c03d6d76e5e3efcf4e4fd7ffd836059d91408.zip FreeBSD-src-9a2c03d6d76e5e3efcf4e4fd7ffd836059d91408.tar.gz |
Change ``set device'' so that it parses its arguments as one
device per argument rather than the old way of concatenating
everything then splitting the result at commas and whitespace.
Old syntax of ``set device /dev/cuaa0, /dev/cuaa1''
may no longer contain the comma, but syntax such as
``set device "!ssh host ppp -direct label"'' is now
possible.
Diffstat (limited to 'usr.sbin/ppp/physical.c')
-rw-r--r-- | usr.sbin/ppp/physical.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ppp/physical.c b/usr.sbin/ppp/physical.c index 875c459..48a2770 100644 --- a/usr.sbin/ppp/physical.c +++ b/usr.sbin/ppp/physical.c @@ -16,7 +16,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: physical.c,v 1.6 1998/08/25 17:48:43 brian Exp $ + * $Id: physical.c,v 1.7 1999/01/10 01:26:29 brian Exp $ * */ @@ -71,10 +71,11 @@ physical_SetDeviceList(struct physical *p, int argc, const char *const *argv) p->cfg.devlist[sizeof p->cfg.devlist - 1] = '\0'; for (f = 0, pos = 0; f < argc && pos < sizeof p->cfg.devlist - 1; f++) { if (pos) - p->cfg.devlist[pos++] = ' '; + p->cfg.devlist[pos++] = '\0'; strncpy(p->cfg.devlist + pos, argv[f], sizeof p->cfg.devlist - pos - 1); pos += strlen(p->cfg.devlist + pos); } + p->cfg.ndev = f; } |