diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-12 20:36:41 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-12 20:36:41 +0000 |
commit | 505a4efdb7e5603e270cb7a7f563cd858af84f7c (patch) | |
tree | b08b5d4bc2c03d6b33a07b20150a7a7034036a28 | |
parent | 458fb496e7c98e6cafc34abb5965e5070624aa00 (diff) |
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. */ |