From d6f9755d35c1c71c70950be516a20be237134480 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 7 Dec 1996 12:20:39 +0000 Subject: [PATCH] fake the isofs label only if other probes fail --- sys/arch/i386/i386/disksubr.c | 14 +++++++------- sys/arch/sparc/sparc/disksubr.c | 11 +++++------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/sys/arch/i386/i386/disksubr.c b/sys/arch/i386/i386/disksubr.c index f111d36234c..4ff78f1503a 100644 --- a/sys/arch/i386/i386/disksubr.c +++ b/sys/arch/i386/i386/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.12 1996/12/05 13:09:35 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.13 1996/12/07 12:20:39 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -99,11 +99,6 @@ readdisklabel(dev, strat, lp, osdep) lp->d_partitions[i].p_size = 0x1fffffff; lp->d_partitions[i].p_offset = 0; -#if defined(CD9660) - if (iso_disklabelspoof(dev, strat, lp) == 0) - return (msg); -#endif - /* get a buffer and initialize it */ bp = geteblk((int)lp->d_secsize); bp->b_dev = dev; @@ -208,8 +203,13 @@ readdisklabel(dev, strat, lp, osdep) } } - if (msg) + if (msg) { +#if defined(CD9660) + if (iso_disklabelspoof(dev, strat, lp) == 0) + return (msg); +#endif goto done; + } /* obtain bad sector table if requested and present */ if (bdp && (lp->d_flags & D_BADSECT)) { diff --git a/sys/arch/sparc/sparc/disksubr.c b/sys/arch/sparc/sparc/disksubr.c index f435c18b1f2..e5c2211efa5 100644 --- a/sys/arch/sparc/sparc/disksubr.c +++ b/sys/arch/sparc/sparc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.8 1996/12/06 00:12:21 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.9 1996/12/07 12:20:40 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.16 1996/04/28 20:25:59 thorpej Exp $ */ /* @@ -146,11 +146,6 @@ readdisklabel(dev, strat, lp, clp) lp->d_partitions[0].p_size = 0x1fffffff; lp->d_partitions[0].p_offset = 0; -#if defined(CD9660) - if (iso_disklabelspoof(dev, strat, lp) == 0) - return (NULL); -#endif - /* obtain buffer to probe drive with */ bp = geteblk((int)lp->d_secsize); @@ -187,6 +182,10 @@ readdisklabel(dev, strat, lp, clp) return (NULL); } +#if defined(CD9660) + if (iso_disklabelspoof(dev, strat, lp) == 0) + return (NULL); +#endif bzero(clp->cd_block, sizeof(clp->cd_block)); return ("no disk label"); } -- 2.20.1