aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/physical.c
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1999-04-27 00:23:57 +0000
committerBrian Somers <brian@FreeBSD.org>1999-04-27 00:23:57 +0000
commita8d7acdc03c05a0eb8b9fd78edc3cfc9cd06e4da (patch)
tree9a7c38f7ee4b3e79da132faa6ae5d114c4623770 /usr.sbin/ppp/physical.c
parent5007fcb30fb0f3cdc75234eb19506a8421053ca6 (diff)
downloadsrc-a8d7acdc03c05a0eb8b9fd78edc3cfc9cd06e4da.tar.gz
src-a8d7acdc03c05a0eb8b9fd78edc3cfc9cd06e4da.zip
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.
Notes
Notes: svn path=/head/; revision=46102
Diffstat (limited to 'usr.sbin/ppp/physical.c')
-rw-r--r--usr.sbin/ppp/physical.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ppp/physical.c b/usr.sbin/ppp/physical.c
index 875c4596e4df..48a27705780f 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;
}