summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-06-01 00:07:49 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-06-01 00:07:49 +0000
commit50b189678902e9ab33471bd656c5e3a65520d9c3 (patch)
tree6a12648df155641161433115c6f6ae947b139b04 /sys/dev
parentde25703b03d0b81b319602e0e00a300f49f80058 (diff)
Don't initialize d_partitions[RAW_DISK] just before calling
readdisklabel(), since all readdisklabel()'s do that already. ok deraadt@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/wd.c7
-rw-r--r--sys/dev/ccd.c7
-rw-r--r--sys/dev/flash.c8
-rw-r--r--sys/dev/isa/fd.c7
-rw-r--r--sys/dev/isa/mcd.c7
-rw-r--r--sys/dev/ofw/ofdisk.c5
-rw-r--r--sys/dev/ramdisk.c7
-rw-r--r--sys/dev/vnd.c7
8 files changed, 8 insertions, 47 deletions
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c
index 2353c8527df..a9c23e1b1ba 100644
--- a/sys/dev/ata/wd.c
+++ b/sys/dev/ata/wd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd.c,v 1.59 2007/05/31 05:24:06 krw Exp $ */
+/* $OpenBSD: wd.c,v 1.60 2007/06/01 00:07:48 krw Exp $ */
/* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */
/*
@@ -795,11 +795,6 @@ wdgetdefaultlabel(struct wd_softc *wd, struct disklabel *lp)
lp->d_interleave = 1;
lp->d_flags = 0;
- lp->d_partitions[RAW_PART].p_offset = 0;
- lp->d_partitions[RAW_PART].p_size = lp->d_secperunit;
- lp->d_partitions[RAW_PART].p_fstype = FS_UNUSED;
- lp->d_npartitions = RAW_PART + 1;
-
lp->d_magic = DISKMAGIC;
lp->d_magic2 = DISKMAGIC;
lp->d_checksum = dkcksum(lp);
diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c
index dc098e2379c..7009bb00642 100644
--- a/sys/dev/ccd.c
+++ b/sys/dev/ccd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ccd.c,v 1.72 2007/04/28 12:32:13 krw Exp $ */
+/* $OpenBSD: ccd.c,v 1.73 2007/06/01 00:07:48 krw Exp $ */
/* $NetBSD: ccd.c,v 1.33 1996/05/05 04:21:14 thorpej Exp $ */
/*-
@@ -1385,11 +1385,6 @@ ccdgetdisklabel(dev_t dev, struct ccd_softc *cs, struct disklabel *lp,
lp->d_interleave = 1;
lp->d_flags = 0;
- lp->d_partitions[RAW_PART].p_offset = 0;
- lp->d_partitions[RAW_PART].p_size = lp->d_secperunit;
- lp->d_partitions[RAW_PART].p_fstype = FS_UNUSED;
- lp->d_npartitions = RAW_PART + 1;
-
lp->d_magic = DISKMAGIC;
lp->d_magic2 = DISKMAGIC;
lp->d_checksum = dkcksum(cs->sc_dkdev.dk_label);
diff --git a/sys/dev/flash.c b/sys/dev/flash.c
index ed46c3f6c00..403091b9d48 100644
--- a/sys/dev/flash.c
+++ b/sys/dev/flash.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: flash.c,v 1.2 2007/02/15 00:53:26 krw Exp $ */
+/* $OpenBSD: flash.c,v 1.3 2007/06/01 00:07:48 krw Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@openbsd.org>
@@ -1001,12 +1001,6 @@ flashgetdefaultlabel(dev_t dev, struct flash_softc *sc,
lp->d_bbsize = BBSIZE;
lp->d_sbsize = SBSIZE;
- /* Fake the partition information. */
- lp->d_npartitions = RAW_PART + 1;
- lp->d_partitions[RAW_PART].p_size = lp->d_secperunit;
- lp->d_partitions[RAW_PART].p_offset = 0;
- lp->d_partitions[RAW_PART].p_fstype = FS_UNUSED;
-
/* Wrap it up. */
lp->d_magic = DISKMAGIC;
lp->d_magic2 = DISKMAGIC;
diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c
index c46967b86ad..3d824ea5e26 100644
--- a/sys/dev/isa/fd.c
+++ b/sys/dev/isa/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.62 2007/05/08 20:59:39 deraadt Exp $ */
+/* $OpenBSD: fd.c,v 1.63 2007/06/01 00:07:48 krw Exp $ */
/* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */
/*-
@@ -986,11 +986,6 @@ fdioctl(dev, cmd, addr, flag, p)
lp->d_rpm = 300;
lp->d_interleave = 1;
- lp->d_partitions[RAW_PART].p_offset = 0;
- lp->d_partitions[RAW_PART].p_size = lp->d_secperunit;
- lp->d_partitions[RAW_PART].p_fstype = FS_UNUSED;
- lp->d_npartitions = RAW_PART + 1;
-
lp->d_magic = DISKMAGIC;
lp->d_magic2 = DISKMAGIC;
lp->d_checksum = dkcksum(lp);
diff --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c
index 75e25f16dec..ec87e7cfc2e 100644
--- a/sys/dev/isa/mcd.c
+++ b/sys/dev/isa/mcd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mcd.c,v 1.43 2007/05/04 22:14:36 deraadt Exp $ */
+/* $OpenBSD: mcd.c,v 1.44 2007/06/01 00:07:48 krw Exp $ */
/* $NetBSD: mcd.c,v 1.60 1998/01/14 12:14:41 drochner Exp $ */
/*
@@ -758,11 +758,6 @@ mcdgetdisklabel(dev, sc, lp, clp, spoofonly)
lp->d_rpm = 300;
lp->d_interleave = 1;
- lp->d_partitions[RAW_PART].p_offset = 0;
- lp->d_partitions[RAW_PART].p_size = lp->d_secperunit;
- lp->d_partitions[RAW_PART].p_fstype = FS_UNUSED;
- lp->d_npartitions = RAW_PART + 1;
-
lp->d_magic = DISKMAGIC;
lp->d_magic2 = DISKMAGIC;
lp->d_checksum = dkcksum(lp);
diff --git a/sys/dev/ofw/ofdisk.c b/sys/dev/ofw/ofdisk.c
index 8829bdfc7f2..9a8b2fdf58b 100644
--- a/sys/dev/ofw/ofdisk.c
+++ b/sys/dev/ofw/ofdisk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofdisk.c,v 1.13 2007/05/28 15:44:04 miod Exp $ */
+/* $OpenBSD: ofdisk.c,v 1.14 2007/06/01 00:07:48 krw Exp $ */
/* $NetBSD: ofdisk.c,v 1.3 1996/10/13 01:38:13 christos Exp $ */
/*
@@ -164,9 +164,6 @@ ofdopen(dev_t dev, int flags, int fmt, struct proc *p)
lp->d_ntracks = 1;
lp->d_ncylinders = lp->d_secperunit;
- lp->d_partitions[RAW_PART].p_offset = 0;
- lp->d_partitions[RAW_PART].p_size = lp->d_secperunit;
-
readdisklabel(DISKLABELDEV(dev), ofdstrategy, lp,
of->sc_dk.dk_cpulabel, 0);
}
diff --git a/sys/dev/ramdisk.c b/sys/dev/ramdisk.c
index 799d4954ccd..6bd7a5da072 100644
--- a/sys/dev/ramdisk.c
+++ b/sys/dev/ramdisk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ramdisk.c,v 1.30 2007/04/24 23:14:00 krw Exp $ */
+/* $OpenBSD: ramdisk.c,v 1.31 2007/06/01 00:07:48 krw Exp $ */
/* $NetBSD: ramdisk.c,v 1.8 1996/04/12 08:30:09 leo Exp $ */
/*
@@ -496,11 +496,6 @@ rdgetdisklabel(dev_t dev, struct rd_softc *sc)
lp->d_rpm = 3600;
lp->d_interleave = 1;
- lp->d_partitions[RAW_PART].p_offset = 0;
- lp->d_partitions[RAW_PART].p_size = lp->d_secperunit;
- lp->d_partitions[RAW_PART].p_fstype = FS_UNUSED;
- lp->d_npartitions = RAW_PART + 1;
-
lp->d_magic = DISKMAGIC;
lp->d_magic2 = DISKMAGIC;
lp->d_checksum = dkcksum(lp);
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index e74b9a74676..7225fc3db97 100644
--- a/sys/dev/vnd.c
+++ b/sys/dev/vnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnd.c,v 1.74 2007/05/12 12:19:23 krw Exp $ */
+/* $OpenBSD: vnd.c,v 1.75 2007/06/01 00:07:48 krw Exp $ */
/* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */
/*
@@ -314,11 +314,6 @@ vndgetdisklabel(dev_t dev, struct vnd_softc *sc)
lp->d_interleave = 1;
lp->d_flags = 0;
- lp->d_partitions[RAW_PART].p_offset = 0;
- lp->d_partitions[RAW_PART].p_size = lp->d_secperunit;
- lp->d_partitions[RAW_PART].p_fstype = FS_UNUSED;
- lp->d_npartitions = RAW_PART + 1;
-
lp->d_magic = DISKMAGIC;
lp->d_magic2 = DISKMAGIC;
lp->d_checksum = dkcksum(lp);