summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2001-10-15 04:03:46 +0000
committerJason Wright <jason@cvs.openbsd.org>2001-10-15 04:03:46 +0000
commit400f498bde6992f91645abbde07b6d7ba4ae7c07 (patch)
treeb11e77431742aefedaee390018b09a3901470539 /sys/arch/sparc
parent641b65e6f545ea0a415b017af8caa5a31f1d6319 (diff)
Make the test for iso9660 filesystems preferred if the device is a CD,
and use old behavior otherwise (check for sun label, then native label, then iso label).
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/sparc/disksubr.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/arch/sparc/sparc/disksubr.c b/sys/arch/sparc/sparc/disksubr.c
index 440fd75f85a..ba941b0bc80 100644
--- a/sys/arch/sparc/sparc/disksubr.c
+++ b/sys/arch/sparc/sparc/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.25 2001/06/26 22:31:47 miod Exp $ */
+/* $OpenBSD: disksubr.c,v 1.26 2001/10/15 04:03:45 jason Exp $ */
/* $NetBSD: disksubr.c,v 1.16 1996/04/28 20:25:59 thorpej Exp $ */
/*
@@ -52,6 +52,7 @@
#endif
#include <sparc/dev/sbusvar.h>
+#include "cd.h"
#if MAXPARTITIONS != 16
#warn beware: Sun disklabel compatibility assumes MAXPARTITIONS == 16
@@ -119,6 +120,11 @@ dk_establish(dk, dev)
}
}
+#if NCD > 0
+/* XXX for comparison below. */
+extern void cdstrategy __P((struct buf *));
+#endif
+
/*
* Attempt to read a disk label from a device
* using the indicated strategy routine.
@@ -184,6 +190,12 @@ readdisklabel(dev, strat, lp, clp, spoofonly)
if (error)
return ("disk label read error");
+#if defined(CD9660) && (NCD > 0)
+ if ((strat == cdstrategy) &&
+ (iso_disklabelspoof(dev, strat, lp) == NULL))
+ return (NULL);
+#endif
+
/* Check for a Sun disk label (for PROM compatibility). */
slp = (struct sun_disklabel *) clp->cd_block;
if (slp->sl_magic == SUN_DKMAGIC)