diff options
author | phk <phk@FreeBSD.org> | 1995-10-05 20:51:39 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1995-10-05 20:51:39 +0000 |
commit | 73c29c06751229bf5749b8422047cf613fb47bbc (patch) | |
tree | 09404da8841de13e80c3a6b24f3082664bda568c /sys/i386/boot/netboot | |
parent | 91aa19bcd73ab0a9bc3fca3ba297db352de37841 (diff) | |
download | FreeBSD-src-73c29c06751229bf5749b8422047cf613fb47bbc.zip FreeBSD-src-73c29c06751229bf5749b8422047cf613fb47bbc.tar.gz |
Make the netboot more tolerant about the config file.
Diffstat (limited to 'sys/i386/boot/netboot')
-rw-r--r-- | sys/i386/boot/netboot/bootmenu.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/i386/boot/netboot/bootmenu.c b/sys/i386/boot/netboot/bootmenu.c index 77a12ed..662a457 100644 --- a/sys/i386/boot/netboot/bootmenu.c +++ b/sys/i386/boot/netboot/bootmenu.c @@ -276,14 +276,19 @@ execute(buf) { char *p, *q; struct bootcmds_t *cmd = bootcmds; - if ((!(*buf)) || (*buf == '#')) return(0); + while (*buf == ' ' || *buf == '\t') + buf++; + if ((!(*buf)) || (*buf == '#')) + return(0); while(cmd->name) { p = buf; q = cmd->name; while (*q && (*(q++) == *(p++))) ; - if ((!(*q)) && ((*p == ' ') || (!(*p)))) { - if (!cmd->func) return(1); - while (*p == ' ') p++; + if ((!(*q)) && ((*p == ' ') || (*p == '\t') || (!(*p)))) { + if (!cmd->func) + return(1); + while (*p == ' ') + p++; (cmd->func)(p); return(0); } else |