Module Name: src Committed By: phx Date: Mon Jan 10 20:16:42 UTC 2011
Modified Files: src/sys/arch/sandpoint/stand/netboot: main.c Log Message: Accept "wd[N[p]]:" (with N=disk and p=partition) for specifying a disk drive. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/sandpoint/stand/netboot/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/sandpoint/stand/netboot/main.c diff -u src/sys/arch/sandpoint/stand/netboot/main.c:1.36 src/sys/arch/sandpoint/stand/netboot/main.c:1.37 --- src/sys/arch/sandpoint/stand/netboot/main.c:1.36 Sun Jan 9 22:59:40 2011 +++ src/sys/arch/sandpoint/stand/netboot/main.c Mon Jan 10 20:16:42 2011 @@ -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; }