Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sandpoint/stand/netboot Accept "wd[N[p]]:" (with N=...
details: https://anonhg.NetBSD.org/src/rev/86decfec8be0
branches: trunk
changeset: 760678:86decfec8be0
user: phx <phx%NetBSD.org@localhost>
date: Mon Jan 10 20:16:42 2011 +0000
description:
Accept "wd[N[p]]:" (with N=disk and p=partition) for specifying a disk drive.
diffstat:
sys/arch/sandpoint/stand/netboot/main.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diffs (36 lines):
diff -r ec64d3043fda -r 86decfec8be0 sys/arch/sandpoint/stand/netboot/main.c
--- a/sys/arch/sandpoint/stand/netboot/main.c Mon Jan 10 20:14:52 2011 +0000
+++ b/sys/arch/sandpoint/stand/netboot/main.c Mon Jan 10 20:16:42 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.36 2011/01/09 22:59:40 phx Exp $ */
+/* $NetBSD: main.c,v 1.37 2011/01/10 20:16:42 phx Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -300,7 +300,7 @@
* nfs:<bootfile>
* tftp:
* tftp:<bootfile>
- * wdN:<bootfile>
+ * wd[N[P]]:<bootfile>
*
* net is a synonym of nfs.
*/
@@ -308,9 +308,14 @@
return 1;
if (strncmp(s, "tftp:", 5) == 0)
return 1;
- if (s[0] == 'w' && s[1] == 'd'
- && s[2] >= '0' && s[2] <= '3' && s[3] == ':') {
- return s[4] != '\0';
+ if (s[0] == 'w' && s[1] == 'd') {
+ s += 2;
+ if (*s != ':' && *s >= '0' && *s <= '3') {
+ ++s;
+ if (*s != ':' && *s >= 'a' && *s <= 'p')
+ ++s;
+ }
+ return *s == ':';
}
return 0;
}
Home |
Main Index |
Thread Index |
Old Index