diff options
author | 2007-12-12 20:36:40 +0000 | |
---|---|---|
committer | 2007-12-12 20:36:40 +0000 | |
commit | f03252cda2e406cf0d673b80354cf87ceb17af92 (patch) | |
tree | 3ac230d22097d3e6a190b7a2d67ee517b829733a | |
parent | Mask the clock interrupts until cpu_initclocks() is invoked. (diff) | |
download | wireguard-openbsd-f03252cda2e406cf0d673b80354cf87ceb17af92.tar.xz wireguard-openbsd-f03252cda2e406cf0d673b80354cf87ceb17af92.zip |
Remove possible trailing \r from the PROM commandline arguments.
-rw-r--r-- | sys/arch/aviion/aviion/autoconf.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/arch/aviion/aviion/autoconf.c b/sys/arch/aviion/aviion/autoconf.c index b986da959a1..209e60a1656 100644 --- a/sys/arch/aviion/aviion/autoconf.c +++ b/sys/arch/aviion/aviion/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.6 2007/11/21 22:05:18 miod Exp $ */ +/* $OpenBSD: autoconf.c,v 1.7 2007/12/12 20:36:40 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -130,6 +130,16 @@ cmdline_parse(void) char *p; /* + * If the boot commandline has been manually entered, it + * may end with a '\r' character. + */ + for (p = bootargs; *p != '\0'; p++) + ; + if (p != bootargs) + if (*--p == '\r') + *p = '\0'; + + /* * Skip boot device ``foo(ctrl,dev,lun)'' and filename, * i.e. eat everything until whitespace. */ |