diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2006-11-29 15:03:43 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2006-11-29 15:03:43 +0000 |
commit | f001ab3a468c6f56fe4a3b27d02b90216bd5dd44 (patch) | |
tree | 3bb0a3e3304c5c89c12d69e432c905949505e3b5 | |
parent | ac2475d7bc0b619109dacbe5cf8a80814a6953ac (diff) |
The historical reasons to spoof the 'c' partition of ccdN as being FFS
are no longer operative. Spoof the label created for ccdN with an
UNUSED 'c' partition like every other device's spoofed label.
Problem pointed out by millert@ in relation to pending disklabel(8)
changes.
ok mickey@ deraadt@
-rw-r--r-- | sys/dev/ccd.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c index 70956dbf155..f1d206b1936 100644 --- a/sys/dev/ccd.c +++ b/sys/dev/ccd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ccd.c,v 1.67 2006/08/12 18:08:11 krw Exp $ */ +/* $OpenBSD: ccd.c,v 1.68 2006/11/29 15:03:42 krw Exp $ */ /* $NetBSD: ccd.c,v 1.33 1996/05/05 04:21:14 thorpej Exp $ */ /*- @@ -182,7 +182,6 @@ long ccdbuffer(struct ccd_softc *, struct buf *, daddr_t, caddr_t, long, struct ccdbuf **, int); void ccdgetdisklabel(dev_t, struct ccd_softc *, struct disklabel *, struct cpu_disklabel *, int); -void ccdmakedisklabel(struct ccd_softc *); int ccdlock(struct ccd_softc *); void ccdunlock(struct ccd_softc *); INLINE struct ccdbuf *getccdbuf(void); @@ -1518,33 +1517,12 @@ ccdgetdisklabel(dev_t dev, struct ccd_softc *cs, struct disklabel *lp, */ errstring = readdisklabel(CCDLABELDEV(dev), ccdstrategy, cs->sc_dkdev.dk_label, cs->sc_dkdev.dk_cpulabel, spoofonly); - if (errstring) - ccdmakedisklabel(cs); - /* It's actually extremely common to have unlabeled ccds. */ if (errstring != NULL) CCD_DPRINTF(CCDB_LABEL, ("%s: %s\n", cs->sc_xname, errstring)); } /* - * Take care of things one might want to take care of in the event - * that a disklabel isn't present. - */ -void -ccdmakedisklabel(struct ccd_softc *cs) -{ - struct disklabel *lp = cs->sc_dkdev.dk_label; - - /* - * For historical reasons, if there's no disklabel present - * the raw partition must be marked FS_BSDFFS. - */ - lp->d_partitions[RAW_PART].p_fstype = FS_BSDFFS; - - strncpy(lp->d_packname, "default label", sizeof(lp->d_packname)); -} - -/* * Wait interruptibly for an exclusive lock. * * XXX |