diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-05-29 18:53:55 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-05-29 18:53:55 +0000 |
commit | b801f8095a1015c391b55d8cbfe87eb929f3c259 (patch) | |
tree | 760986210e9ad71c6510ec4e316bdf06c5877cb7 /sys/arch/hppa64 | |
parent | e3bec23801625290db4be31b65ff84ec71c78a40 (diff) |
Sync with hppa r1.11: Correctly handle boot drives with SCSI id >= 10
Diffstat (limited to 'sys/arch/hppa64')
-rw-r--r-- | sys/arch/hppa64/stand/libsa/dev_hppa64.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/arch/hppa64/stand/libsa/dev_hppa64.c b/sys/arch/hppa64/stand/libsa/dev_hppa64.c index 75eb87528e4..d081d5dfe12 100644 --- a/sys/arch/hppa64/stand/libsa/dev_hppa64.c +++ b/sys/arch/hppa64/stand/libsa/dev_hppa64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev_hppa64.c,v 1.1 2005/04/01 10:40:48 mickey Exp $ */ +/* $OpenBSD: dev_hppa64.c,v 1.2 2005/05/29 18:53:54 miod Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -113,8 +113,10 @@ devboot(dev, p) char *p; { const char *q; + int unit; + if (!dev) { - int type, unit; + int type; switch (PAGE0->mem_boot.pz_class) { case PCL_RANDOM: @@ -146,7 +148,12 @@ devboot(dev, p) #endif /* quick copy device name */ for (q = pdc_devs[B_TYPE(dev)].name; (*p++ = *q++);); - p[-1] = '0' + B_UNIT(dev); + unit = B_UNIT(dev); + if (unit >= 10) { + p[-1] = '0' + unit / 10; + *p++ = '0' + (unit % 10); + } else + p[-1] = '0' + unit; *p++ = 'a' + B_PARTITION(dev); *p = '\0'; } |