From b801f8095a1015c391b55d8cbfe87eb929f3c259 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sun, 29 May 2005 18:53:55 +0000 Subject: Sync with hppa r1.11: Correctly handle boot drives with SCSI id >= 10 --- sys/arch/hppa64/stand/libsa/dev_hppa64.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'sys/arch/hppa64/stand') 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'; } -- cgit v1.2.3