summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/macppc/macppc/autoconf.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/sys/arch/macppc/macppc/autoconf.c b/sys/arch/macppc/macppc/autoconf.c
index e304cb5089c..9268de605cb 100644
--- a/sys/arch/macppc/macppc/autoconf.c
+++ b/sys/arch/macppc/macppc/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.23 2007/03/27 07:23:33 deraadt Exp $ */
+/* $OpenBSD: autoconf.c,v 1.24 2007/03/28 06:17:37 dlg Exp $ */
/*
* Copyright (c) 1996, 1997 Per Fogelstrom
* Copyright (c) 1995 Theo de Raadt
@@ -37,7 +37,7 @@
* from: Utah Hdr: autoconf.c 1.31 91/01/21
*
* from: @(#)autoconf.c 8.1 (Berkeley) 6/10/93
- * $Id: autoconf.c,v 1.23 2007/03/27 07:23:33 deraadt Exp $
+ * $Id: autoconf.c,v 1.24 2007/03/28 06:17:37 dlg Exp $
*/
/*
@@ -592,13 +592,19 @@ makebootdev(char *bp)
int
getpno(char **cp)
{
- int val = 0;
+ int val = 0, digit;
char *cx = *cp;
- while(*cx && *cx >= '0' && *cx <= '9') {
- val = val * 10 + *cx - '0';
+ while (*cx) {
+ if (*cx >= '0' && *cx <= '9')
+ digit = *cx - '0';
+ else if (*cx >= 'a' && *cx <= 'f')
+ digit = *cx - 'a' + 0x0a;
+ else
+ break;
+ val = val * 16 + digit;
cx++;
}
*cp = cx;
- return val;
+ return (val);
}