aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/command.c
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2000-03-14 01:47:31 +0000
committerBrian Somers <brian@FreeBSD.org>2000-03-14 01:47:31 +0000
commit2a30e2ac0b09cb67cd405a077241278929a8ca65 (patch)
tree70e68e479e5b27fc33e6978e974a7c7ec9bfe734 /usr.sbin/ppp/command.c
parentd568d6c405600fff668454f930567249c69279d0 (diff)
Notes
Diffstat (limited to 'usr.sbin/ppp/command.c')
-rw-r--r--usr.sbin/ppp/command.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c
index 06ce82d4a049..99753c3cfe0e 100644
--- a/usr.sbin/ppp/command.c
+++ b/usr.sbin/ppp/command.c
@@ -935,6 +935,18 @@ FindExec(struct bundle *bundle, struct cmdtab const *cmds, int argc, int argn,
}
int
+command_Expand_Interpret(char *buff, int nb, char *argv[MAXARGS], int offset)
+{
+ char buff2[LINE_LEN-offset];
+
+ InterpretArg(buff, buff2);
+ strncpy(buff, buff2, LINE_LEN - offset - 1);
+ buff[LINE_LEN - offset - 1] = '\0';
+
+ return command_Interpret(buff, nb, argv);
+}
+
+int
command_Interpret(char *buff, int nb, char *argv[MAXARGS])
{
char *cp;
@@ -1013,7 +1025,7 @@ command_Decode(struct bundle *bundle, char *buff, int nb, struct prompt *prompt,
int argc;
char *argv[MAXARGS];
- if ((argc = command_Interpret(buff, nb, argv)) < 0)
+ if ((argc = command_Expand_Interpret(buff, nb, argv, 0)) < 0)
return 0;
command_Run(bundle, argc, (char const *const *)argv, prompt, label, NULL);