Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/xen/i386 fix kernel command line parsing:
details: https://anonhg.NetBSD.org/src/rev/70896976f491
branches: trunk
changeset: 565515:70896976f491
user: cl <cl%NetBSD.org@localhost>
date: Sat Apr 10 23:33:50 2004 +0000
description:
fix kernel command line parsing:
- initialize bootdev for if it's not set in the command line
- correctly parse command lines with multiple spaces between words
diffstat:
sys/arch/xen/i386/xen_machdep.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diffs (40 lines):
diff -r 4862f12d9b3a -r 70896976f491 sys/arch/xen/i386/xen_machdep.c
--- a/sys/arch/xen/i386/xen_machdep.c Sat Apr 10 23:31:51 2004 +0000
+++ b/sys/arch/xen/i386/xen_machdep.c Sat Apr 10 23:33:50 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xen_machdep.c,v 1.1 2004/03/11 21:44:08 cl Exp $ */
+/* $NetBSD: xen_machdep.c,v 1.2 2004/04/10 23:33:50 cl Exp $ */
/*
*
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xen_machdep.c,v 1.1 2004/03/11 21:44:08 cl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_machdep.c,v 1.2 2004/04/10 23:33:50 cl Exp $");
#include "opt_xen.h"
@@ -127,15 +127,18 @@
cmd_line = xen_start_info.cmd_line;
+ if (bootdev)
+ bootdev[0] = 0;
+
while (cmd_line && *cmd_line) {
opt = cmd_line;
cmd_line = strchr(opt, ' ');
+ if (strlen(opt) == 0)
+ continue;
+
if (cmd_line)
*cmd_line = 0;
- if (strlen(opt) == 0)
- continue;
-
if (bootdev && strncasecmp(opt, "bootdev=", 8) == 0)
strncpy(bootdev, opt + 8, 16); /* dv_xname */
Home |
Main Index |
Thread Index |
Old Index