summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2010-04-23 15:25:22 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2010-04-23 15:25:22 +0000
commit38fc778c9782dbaa70fa6da92cfd8daaaa43d6fe (patch)
treeae3cdf39a2c58715ddd572c6ba0e0e6d72ea4ce2
parented069888a3c009f9af5ecffb1dd73b037a5b95c2 (diff)
Recycle unused disklabel fields in order to create a disklabel unique
identifier, allowing the disk to be identified without relying on the device name. ok deraadt@ krw@ beck@ marco@ todd@
-rw-r--r--lib/libc/gen/disklabel.c2
-rw-r--r--sbin/disklabel/disklabel.c28
-rw-r--r--sbin/disklabel/editor.c38
-rw-r--r--sbin/newfs/newfs.c4
-rw-r--r--sys/arch/amd64/stand/libsa/diskprobe.c4
-rw-r--r--sys/arch/armish/stand/boot/wd.c4
-rw-r--r--sys/arch/hp300/dev/hd.c4
-rw-r--r--sys/arch/i386/stand/libsa/diskprobe.c4
-rw-r--r--sys/arch/luna88k/luna88k/disksubr.c12
-rw-r--r--sys/arch/mvme68k/mvme68k/disksubr.c11
-rw-r--r--sys/arch/mvme68k/stand/libsa/bugdev.c6
-rw-r--r--sys/arch/mvme88k/mvme88k/disksubr.c11
-rw-r--r--sys/arch/mvme88k/stand/libsa/bugdev.c6
-rw-r--r--sys/arch/sgi/sgi/disksubr.c3
-rw-r--r--sys/arch/sgi/stand/sgivol/sgivol.c4
-rw-r--r--sys/arch/socppc/stand/boot/wd.c4
-rw-r--r--sys/arch/sparc/dev/fd.c4
-rw-r--r--sys/arch/sparc/dev/presto.c4
-rw-r--r--sys/arch/sparc/sparc/disksubr.c12
-rw-r--r--sys/arch/sparc64/dev/fd.c4
-rw-r--r--sys/arch/sparc64/sparc64/disksubr.c12
-rw-r--r--sys/arch/sparc64/stand/ofwboot/ofdev.c5
-rw-r--r--sys/arch/vax/mscp/mscp_disk.c5
-rw-r--r--sys/arch/vax/vsa/hdc9224.c4
-rw-r--r--sys/dev/ata/wd.c4
-rw-r--r--sys/dev/ccd.c10
-rw-r--r--sys/dev/flash.c5
-rw-r--r--sys/dev/isa/fd.c4
-rw-r--r--sys/dev/isa/mcd.c4
-rw-r--r--sys/dev/raidframe/rf_openbsdkintf.c4
-rw-r--r--sys/dev/ramdisk.c4
-rw-r--r--sys/dev/sun/disklabel.h6
-rw-r--r--sys/dev/vnd.c4
-rw-r--r--sys/kern/subr_disk.c7
-rw-r--r--sys/scsi/cd.c4
-rw-r--r--sys/scsi/sd.c4
-rw-r--r--sys/sys/disklabel.h30
37 files changed, 62 insertions, 223 deletions
diff --git a/lib/libc/gen/disklabel.c b/lib/libc/gen/disklabel.c
index 402665c8f70..0226ff0c055 100644
--- a/lib/libc/gen/disklabel.c
+++ b/lib/libc/gen/disklabel.c
@@ -95,8 +95,6 @@ getdiskbyname(const char *name)
getnumdflt(dp->d_secpercyl, "sc", dp->d_nsectors * dp->d_ntracks);
/* XXX */
getnumdflt(dp->d_secperunit, "su", dp->d_secpercyl * dp->d_ncylinders);
- getnumdflt(dp->d_rpm, "rm", 3600);
- getnumdflt(dp->d_interleave, "il", 1);
getnumdflt(dp->d_bbsize, "bs", BBSIZE);
getnumdflt(dp->d_sbsize, "sb", SBSIZE);
strlcpy(psize, "px", sizeof psize);
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c
index aa0418e044d..139f56a4581 100644
--- a/sbin/disklabel/disklabel.c
+++ b/sbin/disklabel/disklabel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disklabel.c,v 1.160 2009/10/27 23:59:32 deraadt Exp $ */
+/* $OpenBSD: disklabel.c,v 1.161 2010/04/23 15:25:21 jsing Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -616,14 +616,6 @@ makedisktab(FILE *f, struct disklabel *lp)
(void)fprintf(f, "sc#%u:", lp->d_secpercyl);
(void)fprintf(f, "su#%llu:", DL_GETDSIZE(lp));
- if (lp->d_rpm != 3600) {
- (void)fprintf(f, "%srm#%hu:", did, lp->d_rpm);
- did = "";
- }
- if (lp->d_interleave != 1) {
- (void)fprintf(f, "%sil#%hu:", did, lp->d_interleave);
- did = "";
- }
/*
* XXX We do not print have disktab information yet for
* XXX DL_GETBSTART DL_GETBEND
@@ -798,8 +790,6 @@ display(FILE *f, struct disklabel *lp, char unit, int all)
d, unit);
fprintf(f, "\n");
- fprintf(f, "rpm: %hu\n", lp->d_rpm);
- fprintf(f, "interleave: %hu\n", lp->d_interleave);
fprintf(f, "boundstart: %llu\n", DL_GETBSTART(lp));
fprintf(f, "boundend: %llu\n", DL_GETBEND(lp));
fprintf(f, "drivedata: ");
@@ -1134,21 +1124,11 @@ getasciilabel(FILE *f, struct disklabel *lp)
continue;
}
if (!strcmp(cp, "rpm")) {
- v = GETNUM(lp->d_rpm, tp, 1, &errstr);
- if (errstr) {
- warnx("line %d: bad %s: %s", lineno, cp, tp);
- errors++;
- } else
- lp->d_rpm = v;
+ /* ignore */
continue;
}
if (!strcmp(cp, "interleave")) {
- v = GETNUM(lp->d_interleave, tp, 1, &errstr);
- if (errstr) {
- warnx("line %d: bad %s: %s", lineno, cp, tp);
- errors++;
- } else
- lp->d_interleave = v;
+ /* ignore */
continue;
}
if (!strcmp(cp, "trackskew")) {
@@ -1299,8 +1279,6 @@ checklabel(struct disklabel *lp)
warnx("cylinders/unit %d", lp->d_ncylinders);
errors++;
}
- if (lp->d_rpm == 0)
- warnx("warning, revolutions/minute %d", lp->d_rpm);
if (lp->d_secpercyl == 0)
lp->d_secpercyl = lp->d_nsectors * lp->d_ntracks;
if (DL_GETDSIZE(lp) == 0)
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c
index f95feeed54c..85362641e2a 100644
--- a/sbin/disklabel/editor.c
+++ b/sbin/disklabel/editor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: editor.c,v 1.234 2010/04/21 03:35:41 lum Exp $ */
+/* $OpenBSD: editor.c,v 1.235 2010/04/23 15:25:21 jsing Exp $ */
/*
* Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -212,10 +212,6 @@ editor(struct disklabel *lp, int f)
if (label.d_sbsize == 0)
label.d_sbsize = SBSIZE;
- /* Interleave must be >= 1 */
- if (label.d_interleave == 0)
- label.d_interleave = 1;
-
/* Save the (U|u)ndo labels and mountpoints. */
mpcopy(origmountpoints, mountpoints);
origlabel = label;
@@ -1457,38 +1453,6 @@ edit_parms(struct disklabel *lp)
if (ending_sector > ui)
ending_sector = ui;
DL_SETDSIZE(lp, ui);
-
- /* rpm */
- for (;;) {
- ui = getuint(lp, "rpm",
- "The rotational speed of the disk in revolutions per minute.",
- lp->d_rpm, lp->d_rpm, 0, 0);
- if (ui == ULLONG_MAX - 1) {
- fputs("Command aborted\n", stderr);
- *lp = oldlabel; /* undo damage */
- return;
- } else if (ui == ULLONG_MAX)
- fputs("Invalid entry\n", stderr);
- else
- break;
- }
- lp->d_rpm = ui;
-
- /* interleave */
- for (;;) {
- ui = getuint(lp, "interleave",
- "The physical sector interleave, set when formatting. Almost always 1.",
- lp->d_interleave, lp->d_interleave, 0, 0);
- if (ui == ULLONG_MAX - 1) {
- fputs("Command aborted\n", stderr);
- *lp = oldlabel; /* undo damage */
- return;
- } else if (ui == ULLONG_MAX || ui == 0)
- fputs("Invalid entry\n", stderr);
- else
- break;
- }
- lp->d_interleave = ui;
}
struct partition **
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c
index 55d151e5915..75d10605e05 100644
--- a/sbin/newfs/newfs.c
+++ b/sbin/newfs/newfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newfs.c,v 1.82 2010/03/20 14:19:38 krw Exp $ */
+/* $OpenBSD: newfs.c,v 1.83 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: newfs.c,v 1.20 1996/05/16 07:13:03 thorpej Exp $ */
/*
@@ -333,8 +333,6 @@ main(int argc, char *argv[])
mfsfakelabel.d_ncylinders = 16;
mfsfakelabel.d_secpercyl = 1024;
mfsfakelabel.d_secperunit = 16384;
- mfsfakelabel.d_rpm = 3600;
- mfsfakelabel.d_interleave = 1;
mfsfakelabel.d_npartitions = 1;
mfsfakelabel.d_version = 1;
DL_SETPSIZE(&mfsfakelabel.d_partitions[0], 16384);
diff --git a/sys/arch/amd64/stand/libsa/diskprobe.c b/sys/arch/amd64/stand/libsa/diskprobe.c
index 7422cee8b0a..e8cdf8e7e7b 100644
--- a/sys/arch/amd64/stand/libsa/diskprobe.c
+++ b/sys/arch/amd64/stand/libsa/diskprobe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diskprobe.c,v 1.7 2009/05/21 23:45:48 krw Exp $ */
+/* $OpenBSD: diskprobe.c,v 1.8 2010/04/23 15:25:20 jsing Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -253,8 +253,6 @@ cdprobe(void)
strncpy(dip->disklabel.d_packname, "fictitious",
sizeof(dip->disklabel.d_packname));
dip->disklabel.d_secperunit = 100;
- dip->disklabel.d_rpm = 300;
- dip->disklabel.d_interleave = 1;
dip->disklabel.d_bbsize = 2048;
dip->disklabel.d_sbsize = 2048;
diff --git a/sys/arch/armish/stand/boot/wd.c b/sys/arch/armish/stand/boot/wd.c
index a0f144645a2..e9bca776dd1 100644
--- a/sys/arch/armish/stand/boot/wd.c
+++ b/sys/arch/armish/stand/boot/wd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd.c,v 1.7 2009/05/21 23:45:48 krw Exp $ */
+/* $OpenBSD: wd.c,v 1.8 2010/04/23 15:25:20 jsing Exp $ */
/* $NetBSD: wd.c,v 1.5 2005/12/11 12:17:06 christos Exp $ */
/*-
@@ -131,8 +131,6 @@ wdgetdefaultlabel(wd, lp)
lp->d_secperunit = UINT32_MAX;
else
lp->d_secperunit = wd->sc_capacity;
- lp->d_rpm = 3600;
- lp->d_interleave = 1;
lp->d_flags = 0;
lp->d_partitions[RAW_PART].p_offset = 0;
diff --git a/sys/arch/hp300/dev/hd.c b/sys/arch/hp300/dev/hd.c
index 5d43b09034e..7d383a501dd 100644
--- a/sys/arch/hp300/dev/hd.c
+++ b/sys/arch/hp300/dev/hd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hd.c,v 1.59 2009/08/24 08:52:13 jasper Exp $ */
+/* $OpenBSD: hd.c,v 1.60 2010/04/23 15:25:20 jsing Exp $ */
/* $NetBSD: rd.c,v 1.33 1997/07/10 18:14:08 kleink Exp $ */
/*
@@ -505,8 +505,6 @@ hdgetdisklabel(dev, rs, lp, spoofonly)
strncpy(lp->d_packname, "fictitious", sizeof lp->d_packname);
DL_SETDSIZE(lp, hdidentinfo[rs->sc_type].ri_nblocks);
- lp->d_rpm = 3600;
- lp->d_interleave = 1;
lp->d_flags = 0;
lp->d_version = 1;
diff --git a/sys/arch/i386/stand/libsa/diskprobe.c b/sys/arch/i386/stand/libsa/diskprobe.c
index eacef340de3..4e0a121b9e1 100644
--- a/sys/arch/i386/stand/libsa/diskprobe.c
+++ b/sys/arch/i386/stand/libsa/diskprobe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diskprobe.c,v 1.31 2009/05/21 23:45:48 krw Exp $ */
+/* $OpenBSD: diskprobe.c,v 1.32 2010/04/23 15:25:20 jsing Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -257,8 +257,6 @@ cdprobe(void)
strncpy(dip->disklabel.d_packname, "fictitious",
sizeof(dip->disklabel.d_packname));
dip->disklabel.d_secperunit = 100;
- dip->disklabel.d_rpm = 300;
- dip->disklabel.d_interleave = 1;
dip->disklabel.d_bbsize = 2048;
dip->disklabel.d_sbsize = 2048;
diff --git a/sys/arch/luna88k/luna88k/disksubr.c b/sys/arch/luna88k/luna88k/disksubr.c
index 9233a7d0ad7..0688bb43bf8 100644
--- a/sys/arch/luna88k/luna88k/disksubr.c
+++ b/sys/arch/luna88k/luna88k/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.43 2010/02/26 23:11:56 deraadt Exp $ */
+/* $OpenBSD: disksubr.c,v 1.44 2010/04/23 15:25:20 jsing Exp $ */
/* $NetBSD: disksubr.c,v 1.12 2002/02/19 17:09:44 wiz Exp $ */
/*
@@ -264,10 +264,9 @@ disklabel_om_to_bsd(struct sun_disklabel *sl, struct disklabel *lp)
DL_SETDSIZE(lp, (daddr64_t)secpercyl * sl->sl_ncylinders);
lp->d_version = 1;
- lp->d_sparespercyl = 0; /* no way to know */
+ lp->d_label_uid = sl->sl_label_uid;
+
lp->d_acylinders = sl->sl_acylinders;
- lp->d_rpm = sl->sl_rpm; /* UniOS - (empty) */
- lp->d_interleave = sl->sl_interleave; /* UniOS - ndisk */
if (sl->sl_rpm == 0) {
/* UniOS label has blkoffset, not cyloffset */
@@ -338,14 +337,15 @@ disklabel_bsd_to_om(struct disklabel *lp, struct sun_disklabel *sl)
sl->sl_rpm = 0; /* UniOS */
#if 0 /* leave as was */
sl->sl_pcyl = lp->d_ncylinders + lp->d_acylinders; /* XXX */
- sl->sl_sparespercyl = lp->d_sparespercyl;
#endif
- sl->sl_interleave = lp->d_interleave;
+ sl->sl_interleave = 1;
sl->sl_ncylinders = lp->d_ncylinders;
sl->sl_acylinders = lp->d_acylinders;
sl->sl_ntracks = lp->d_ntracks;
sl->sl_nsectors = lp->d_nsectors;
+ sl->sl_label_uid = lp->d_label_uid;
+
for (i = 0; i < 8; i++) {
spp = &sl->sl_part[i];
npp = &lp->d_partitions[i];
diff --git a/sys/arch/mvme68k/mvme68k/disksubr.c b/sys/arch/mvme68k/mvme68k/disksubr.c
index 16d1dd89813..d369f6d82b6 100644
--- a/sys/arch/mvme68k/mvme68k/disksubr.c
+++ b/sys/arch/mvme68k/mvme68k/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.67 2010/04/05 02:09:15 miod Exp $ */
+/* $OpenBSD: disksubr.c,v 1.68 2010/04/23 15:25:20 jsing Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1995 Dale Rahn.
@@ -162,12 +162,9 @@ bsdtocpulabel(struct disklabel *lp, struct mvmedisklabel *clp)
clp->secpercyl = lp->d_secpercyl;
clp->secperunit = DL_GETDSIZE(lp);
- clp->sparespertrack = lp->d_sparespertrack;
- clp->sparespercyl = lp->d_sparespercyl;
clp->acylinders = lp->d_acylinders;
- clp->rpm = lp->d_rpm;
- clp->cfg_ilv = lp->d_interleave;
+ clp->cfg_ilv = 1;
clp->cfg_sof = 1;
clp->cylskew = 1;
clp->headswitch = 0;
@@ -218,11 +215,7 @@ cputobsdlabel(struct disklabel *lp, struct mvmedisklabel *clp)
lp->d_secpercyl = clp->secpercyl;
if (DL_GETDSIZE(lp) == 0)
DL_SETDSIZE(lp, clp->secperunit);
- lp->d_sparespertrack = clp->sparespertrack;
- lp->d_sparespercyl = clp->sparespercyl;
lp->d_acylinders = clp->acylinders;
- lp->d_rpm = clp->rpm;
- lp->d_interleave = clp->cfg_ilv;
lp->d_flags = clp->flags;
for (i = 0; i < NDDATA; i++)
lp->d_drivedata[i] = clp->drivedata[i];
diff --git a/sys/arch/mvme68k/stand/libsa/bugdev.c b/sys/arch/mvme68k/stand/libsa/bugdev.c
index a17616a4608..a9c96b59569 100644
--- a/sys/arch/mvme68k/stand/libsa/bugdev.c
+++ b/sys/arch/mvme68k/stand/libsa/bugdev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bugdev.c,v 1.5 2009/06/04 21:57:56 miod Exp $ */
+/* $OpenBSD: bugdev.c,v 1.6 2010/04/23 15:25:20 jsing Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -178,11 +178,7 @@ cputobsdlabel(struct disklabel *lp, struct mvmedisklabel *clp)
lp->d_secperunit = clp->secperunit;
lp->d_secpercyl = clp->secpercyl;
lp->d_secperunit = clp->secperunit;
- lp->d_sparespertrack = clp->sparespertrack;
- lp->d_sparespercyl = clp->sparespercyl;
lp->d_acylinders = clp->acylinders;
- lp->d_rpm = clp->rpm;
- lp->d_interleave = clp->cfg_ilv;
lp->d_flags = clp->flags;
for (i = 0; i < NDDATA; i++)
lp->d_drivedata[i] = clp->drivedata[i];
diff --git a/sys/arch/mvme88k/mvme88k/disksubr.c b/sys/arch/mvme88k/mvme88k/disksubr.c
index 6d4eea636f2..3a6de357144 100644
--- a/sys/arch/mvme88k/mvme88k/disksubr.c
+++ b/sys/arch/mvme88k/mvme88k/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.63 2010/04/05 02:09:16 miod Exp $ */
+/* $OpenBSD: disksubr.c,v 1.64 2010/04/23 15:25:20 jsing Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1995 Dale Rahn.
@@ -162,12 +162,9 @@ bsdtocpulabel(struct disklabel *lp, struct mvmedisklabel *clp)
clp->secpercyl = lp->d_secpercyl;
clp->secperunit = DL_GETDSIZE(lp);
- clp->sparespertrack = lp->d_sparespertrack;
- clp->sparespercyl = lp->d_sparespercyl;
clp->acylinders = lp->d_acylinders;
- clp->rpm = lp->d_rpm;
- clp->cfg_ilv = lp->d_interleave;
+ clp->cfg_ilv = 1;
clp->cfg_sof = 1;
clp->cylskew = 1;
clp->headswitch = 0;
@@ -218,11 +215,7 @@ cputobsdlabel(struct disklabel *lp, struct mvmedisklabel *clp)
lp->d_secpercyl = clp->secpercyl;
if (DL_GETDSIZE(lp) == 0)
DL_SETDSIZE(lp, clp->secperunit);
- lp->d_sparespertrack = clp->sparespertrack;
- lp->d_sparespercyl = clp->sparespercyl;
lp->d_acylinders = clp->acylinders;
- lp->d_rpm = clp->rpm;
- lp->d_interleave = clp->cfg_ilv;
lp->d_flags = clp->flags;
for (i = 0; i < NDDATA; i++)
lp->d_drivedata[i] = clp->drivedata[i];
diff --git a/sys/arch/mvme88k/stand/libsa/bugdev.c b/sys/arch/mvme88k/stand/libsa/bugdev.c
index 944a73f213b..33cc1ffb09c 100644
--- a/sys/arch/mvme88k/stand/libsa/bugdev.c
+++ b/sys/arch/mvme88k/stand/libsa/bugdev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bugdev.c,v 1.5 2009/06/04 21:57:56 miod Exp $ */
+/* $OpenBSD: bugdev.c,v 1.6 2010/04/23 15:25:20 jsing Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -193,11 +193,7 @@ cputobsdlabel(lp, clp)
lp->d_secperunit = clp->secperunit;
lp->d_secpercyl = clp->secpercyl;
lp->d_secperunit = clp->secperunit;
- lp->d_sparespertrack = clp->sparespertrack;
- lp->d_sparespercyl = clp->sparespercyl;
lp->d_acylinders = clp->acylinders;
- lp->d_rpm = clp->rpm;
- lp->d_interleave = clp->cfg_ilv;
lp->d_flags = clp->flags;
for (i = 0; i < NDDATA; i++)
lp->d_drivedata[i] = clp->drivedata[i];
diff --git a/sys/arch/sgi/sgi/disksubr.c b/sys/arch/sgi/sgi/disksubr.c
index 8d98bca0506..a9d947640cd 100644
--- a/sys/arch/sgi/sgi/disksubr.c
+++ b/sys/arch/sgi/sgi/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.18 2009/10/09 04:25:34 deraadt Exp $ */
+/* $OpenBSD: disksubr.c,v 1.19 2010/04/23 15:25:20 jsing Exp $ */
/*
* Copyright (c) 1999 Michael Shalayeff
@@ -155,7 +155,6 @@ readsgilabel(struct buf *bp, void (*strat)(struct buf *),
lp->d_nsectors = dlp->dp.dp_secs;
lp->d_ntracks = dlp->dp.dp_trks0;
lp->d_ncylinders = dlp->dp.dp_cyls;
- lp->d_interleave = dlp->dp.dp_interleave;
lp->d_npartitions = MAXPARTITIONS;
for (i = 0; i < 16; i++) {
diff --git a/sys/arch/sgi/stand/sgivol/sgivol.c b/sys/arch/sgi/stand/sgivol/sgivol.c
index 002204319d1..ff8da7ba4ef 100644
--- a/sys/arch/sgi/stand/sgivol/sgivol.c
+++ b/sys/arch/sgi/stand/sgivol/sgivol.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sgivol.c,v 1.15 2009/06/04 21:57:56 miod Exp $ */
+/* $OpenBSD: sgivol.c,v 1.16 2010/04/23 15:25:20 jsing Exp $ */
/* $NetBSD: sgivol.c,v 1.8 2003/11/08 04:59:00 sekiya Exp $ */
/*-
@@ -311,7 +311,7 @@ init_volhdr(void)
volhdr->dp.dp_trks0 = htobe16(lbl.d_ntracks);
volhdr->dp.dp_secs = htobe16(lbl.d_nsectors);
volhdr->dp.dp_secbytes = htobe16(lbl.d_secsize);
- volhdr->dp.dp_interleave = htobe16(lbl.d_interleave);
+ volhdr->dp.dp_interleave = 1;
volhdr->dp.dp_nretries = htobe32(22);
volhdr->partitions[10].blocks =
htobe32(DL_SECTOBLK(&lbl, lbl.d_secperunit));
diff --git a/sys/arch/socppc/stand/boot/wd.c b/sys/arch/socppc/stand/boot/wd.c
index aff7a3c313c..bb93e595d05 100644
--- a/sys/arch/socppc/stand/boot/wd.c
+++ b/sys/arch/socppc/stand/boot/wd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd.c,v 1.3 2009/05/21 23:45:48 krw Exp $ */
+/* $OpenBSD: wd.c,v 1.4 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: wd.c,v 1.5 2005/12/11 12:17:06 christos Exp $ */
/*-
@@ -147,8 +147,6 @@ wdgetdefaultlabel(wd, lp)
lp->d_secperunit = UINT32_MAX;
else
lp->d_secperunit = wd->sc_capacity;
- lp->d_rpm = 3600;
- lp->d_interleave = 1;
lp->d_flags = 0;
lp->d_partitions[RAW_PART].p_offset = 0;
diff --git a/sys/arch/sparc/dev/fd.c b/sys/arch/sparc/dev/fd.c
index 7a33dd41d06..ede25b1f2ea 100644
--- a/sys/arch/sparc/dev/fd.c
+++ b/sys/arch/sparc/dev/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.68 2009/09/12 01:23:30 krw Exp $ */
+/* $OpenBSD: fd.c,v 1.69 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: fd.c,v 1.51 1997/05/24 20:16:19 pk Exp $ */
/*-
@@ -1945,11 +1945,9 @@ fdgetdisklabel(dev_t dev, struct fd_softc *fd, struct disklabel *lp,
lp->d_ncylinders = fd->sc_type->tracks;
lp->d_ntracks = fd->sc_type->heads; /* Go figure... */
DL_SETDSIZE(lp, fd->sc_type->size);
- lp->d_rpm = 300; /* XXX like it matters... */
strncpy(lp->d_typename, "floppy disk", sizeof(lp->d_typename));
strncpy(lp->d_packname, "fictitious", sizeof(lp->d_packname));
- lp->d_interleave = 1;
lp->d_version = 1;
lp->d_magic = DISKMAGIC;
diff --git a/sys/arch/sparc/dev/presto.c b/sys/arch/sparc/dev/presto.c
index 82e7c0c3ef2..a2435094985 100644
--- a/sys/arch/sparc/dev/presto.c
+++ b/sys/arch/sparc/dev/presto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: presto.c,v 1.15 2009/09/05 00:48:39 krw Exp $ */
+/* $OpenBSD: presto.c,v 1.16 2010/04/23 15:25:21 jsing Exp $ */
/*
* Copyright (c) 2003, Miodrag Vallat.
* All rights reserved.
@@ -372,8 +372,6 @@ presto_getdisklabel(dev_t dev, struct presto_softc *sc)
strncpy(lp->d_typename, "Prestoserve", 16);
lp->d_type = DTYPE_SCSI; /* what better to put here? */
strncpy(lp->d_packname, sc->sc_model, 16);
- lp->d_rpm = 3600;
- lp->d_interleave = 1;
lp->d_version = 1;
lp->d_magic = DISKMAGIC;
diff --git a/sys/arch/sparc/sparc/disksubr.c b/sys/arch/sparc/sparc/disksubr.c
index 6513768187b..114875fbb3e 100644
--- a/sys/arch/sparc/sparc/disksubr.c
+++ b/sys/arch/sparc/sparc/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.83 2010/02/26 23:11:57 deraadt Exp $ */
+/* $OpenBSD: disksubr.c,v 1.84 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: disksubr.c,v 1.16 1996/04/28 20:25:59 thorpej Exp $ */
/*
@@ -267,10 +267,9 @@ disklabel_sun_to_bsd(struct sun_disklabel *sl, struct disklabel *lp)
DL_SETDSIZE(lp, (daddr64_t)secpercyl * sl->sl_ncylinders);
lp->d_version = 1;
- lp->d_sparespercyl = sl->sl_sparespercyl;
+ lp->d_label_uid = sl->sl_label_uid;
+
lp->d_acylinders = sl->sl_acylinders;
- lp->d_rpm = sl->sl_rpm;
- lp->d_interleave = sl->sl_interleave;
lp->d_npartitions = MAXPARTITIONS;
/* These are as defined in <ufs/ffs/fs.h> */
@@ -408,15 +407,14 @@ disklabel_bsd_to_sun(struct disklabel *lp, struct sun_disklabel *sl)
/* Format conversion. */
bzero(sl, sizeof(*sl));
memcpy(sl->sl_text, lp->d_packname, sizeof(lp->d_packname));
- sl->sl_rpm = lp->d_rpm;
sl->sl_pcylinders = lp->d_ncylinders + lp->d_acylinders; /* XXX */
- sl->sl_sparespercyl = lp->d_sparespercyl;
- sl->sl_interleave = lp->d_interleave;
sl->sl_ncylinders = lp->d_ncylinders;
sl->sl_acylinders = lp->d_acylinders;
sl->sl_ntracks = lp->d_ntracks;
sl->sl_nsectors = lp->d_nsectors;
+ sl->sl_label_uid = lp->d_label_uid;
+
secpercyl = sl->sl_nsectors * sl->sl_ntracks;
for (i = 0; i < 8; i++) {
spp = &sl->sl_part[i];
diff --git a/sys/arch/sparc64/dev/fd.c b/sys/arch/sparc64/dev/fd.c
index ee7cbddd59b..0778e8f36d9 100644
--- a/sys/arch/sparc64/dev/fd.c
+++ b/sys/arch/sparc64/dev/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.29 2009/09/12 01:23:30 krw Exp $ */
+/* $OpenBSD: fd.c,v 1.30 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: fd.c,v 1.112 2003/08/07 16:29:35 agc Exp $ */
/*-
@@ -2021,11 +2021,9 @@ fdgetdisklabel(dev_t dev, struct fd_softc *fd, struct disklabel *lp,
lp->d_ncylinders = fd->sc_type->tracks;
lp->d_ntracks = fd->sc_type->heads; /* Go figure... */
DL_SETDSIZE(lp, (daddr64_t)lp->d_secpercyl * lp->d_ncylinders);
- lp->d_rpm = 300; /* XXX like it matters... */
strncpy(lp->d_typename, "floppy disk", sizeof(lp->d_typename));
strncpy(lp->d_packname, "fictitious", sizeof(lp->d_packname));
- lp->d_interleave = 1;
lp->d_version = 1;
lp->d_magic = DISKMAGIC;
diff --git a/sys/arch/sparc64/sparc64/disksubr.c b/sys/arch/sparc64/sparc64/disksubr.c
index 58d977d54e0..1df531ea2a3 100644
--- a/sys/arch/sparc64/sparc64/disksubr.c
+++ b/sys/arch/sparc64/sparc64/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.58 2010/02/26 23:11:57 deraadt Exp $ */
+/* $OpenBSD: disksubr.c,v 1.59 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: disksubr.c,v 1.13 2000/12/17 22:39:18 pk Exp $ */
/*
@@ -260,10 +260,9 @@ disklabel_sun_to_bsd(struct sun_disklabel *sl, struct disklabel *lp)
DL_SETDSIZE(lp, (daddr64_t)secpercyl * sl->sl_ncylinders);
lp->d_version = 1;
- lp->d_sparespercyl = sl->sl_sparespercyl;
+ lp->d_label_uid = sl->sl_label_uid;
+
lp->d_acylinders = sl->sl_acylinders;
- lp->d_rpm = sl->sl_rpm;
- lp->d_interleave = sl->sl_interleave;
lp->d_npartitions = MAXPARTITIONS;
/* These are as defined in <ufs/ffs/fs.h> */
@@ -401,15 +400,14 @@ disklabel_bsd_to_sun(struct disklabel *lp, struct sun_disklabel *sl)
/* Format conversion. */
bzero(sl, sizeof(*sl));
memcpy(sl->sl_text, lp->d_packname, sizeof(lp->d_packname));
- sl->sl_rpm = lp->d_rpm;
sl->sl_pcylinders = lp->d_ncylinders + lp->d_acylinders; /* XXX */
- sl->sl_sparespercyl = lp->d_sparespercyl;
- sl->sl_interleave = lp->d_interleave;
sl->sl_ncylinders = lp->d_ncylinders;
sl->sl_acylinders = lp->d_acylinders;
sl->sl_ntracks = lp->d_ntracks;
sl->sl_nsectors = lp->d_nsectors;
+ sl->sl_label_uid = lp->d_label_uid;
+
secpercyl = sl->sl_nsectors * sl->sl_ntracks;
for (i = 0; i < 8; i++) {
spp = &sl->sl_part[i];
diff --git a/sys/arch/sparc64/stand/ofwboot/ofdev.c b/sys/arch/sparc64/stand/ofwboot/ofdev.c
index 325051b0400..745264bebbf 100644
--- a/sys/arch/sparc64/stand/ofwboot/ofdev.c
+++ b/sys/arch/sparc64/stand/ofwboot/ofdev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofdev.c,v 1.12 2009/11/04 12:03:57 jsing Exp $ */
+/* $OpenBSD: ofdev.c,v 1.13 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: ofdev.c,v 1.1 2000/08/20 14:58:41 mrg Exp $ */
/*
@@ -258,10 +258,7 @@ disklabel_sun_to_bsd(char *cp, struct disklabel *lp)
lp->d_secpercyl = secpercyl;
lp->d_secperunit = secpercyl * sl->sl_ncylinders;
- lp->d_sparespercyl = sl->sl_sparespercyl;
lp->d_acylinders = sl->sl_acylinders;
- lp->d_rpm = sl->sl_rpm;
- lp->d_interleave = sl->sl_interleave;
lp->d_npartitions = MAXPARTITIONS;
/* These are as defined in <ufs/ffs/fs.h> */
diff --git a/sys/arch/vax/mscp/mscp_disk.c b/sys/arch/vax/mscp/mscp_disk.c
index 4ea13d908b5..28d1e734223 100644
--- a/sys/arch/vax/mscp/mscp_disk.c
+++ b/sys/arch/vax/mscp/mscp_disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mscp_disk.c,v 1.26 2009/08/13 15:23:13 deraadt Exp $ */
+/* $OpenBSD: mscp_disk.c,v 1.27 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: mscp_disk.c,v 1.30 2001/11/13 07:38:28 lukem Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -832,10 +832,8 @@ rronline(usc, mp)
if (dl->d_secpercyl) {
dl->d_ncylinders = DL_GETDSIZE(dl) / dl->d_secpercyl;
dl->d_type = DTYPE_MSCP;
- dl->d_rpm = 3600;
} else {
dl->d_type = DTYPE_FLOPPY;
- dl->d_rpm = 300;
}
rrmakelabel(dl, rx->ra_mediaid);
@@ -873,7 +871,6 @@ rrmakelabel(dl, type)
DL_SETPSIZE(&dl->d_partitions[2], DL_GETDSIZE(dl));
DL_SETPOFFSET(&dl->d_partitions[0], 0);
DL_SETPOFFSET(&dl->d_partitions[2], 0);
- dl->d_interleave = 1;
dl->d_version = 1;
dl->d_magic = dl->d_magic2 = DISKMAGIC;
dl->d_checksum = dkcksum(dl);
diff --git a/sys/arch/vax/vsa/hdc9224.c b/sys/arch/vax/vsa/hdc9224.c
index be06500f518..891123ab065 100644
--- a/sys/arch/vax/vsa/hdc9224.c
+++ b/sys/arch/vax/vsa/hdc9224.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hdc9224.c,v 1.26 2009/09/05 15:37:04 deraadt Exp $ */
+/* $OpenBSD: hdc9224.c,v 1.27 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: hdc9224.c,v 1.16 2001/07/26 15:05:09 wiz Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -852,7 +852,6 @@ hdmakelabel(struct disklabel *dl, struct hdgeom *g)
dl->d_typename[p++] = n + '0';
dl->d_typename[p] = 0;
dl->d_type = DTYPE_MSCP; /* XXX - what to use here??? */
- dl->d_rpm = 3600;
dl->d_secsize = DEV_BSIZE;
DL_SETDSIZE(dl, g->lbn_count);
@@ -867,7 +866,6 @@ hdmakelabel(struct disklabel *dl, struct hdgeom *g)
DL_SETPOFFSET(&dl->d_partitions[0], 0);
DL_SETPOFFSET(&dl->d_partitions[2], 0);
- dl->d_interleave = 1;
dl->d_version = 1;
dl->d_magic = dl->d_magic2 = DISKMAGIC;
dl->d_checksum = dkcksum(dl);
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c
index 5a6182a946a..819d333c80b 100644
--- a/sys/dev/ata/wd.c
+++ b/sys/dev/ata/wd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd.c,v 1.78 2010/04/11 16:58:06 kettenis Exp $ */
+/* $OpenBSD: wd.c,v 1.79 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */
/*
@@ -820,8 +820,6 @@ wdgetdefaultlabel(struct wd_softc *wd, struct disklabel *lp)
}
/* XXX - user viscopy() like sd.c */
strncpy(lp->d_packname, wd->sc_params.atap_model, sizeof lp->d_packname);
- lp->d_rpm = 3600;
- lp->d_interleave = 1;
lp->d_flags = 0;
lp->d_version = 1;
diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c
index e598bc2caa9..657f642d0d6 100644
--- a/sys/dev/ccd.c
+++ b/sys/dev/ccd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ccd.c,v 1.88 2009/08/24 08:51:18 jasper Exp $ */
+/* $OpenBSD: ccd.c,v 1.89 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: ccd.c,v 1.33 1996/05/05 04:21:14 thorpej Exp $ */
/*-
@@ -259,7 +259,7 @@ ccdinit(struct ccddevice *ccd, char **cpaths, struct proc *p)
struct ccd_softc *cs = &ccd_softc[ccd->ccd_unit];
struct ccdcinfo *ci = NULL;
daddr64_t size;
- int ix, rpm;
+ int ix;
struct vnode *vp;
struct vattr va;
size_t minsize;
@@ -291,7 +291,6 @@ ccdinit(struct ccddevice *ccd, char **cpaths, struct proc *p)
*/
maxsecsize = 0;
minsize = 0;
- rpm = 0;
for (ix = 0; ix < cs->sc_nccdisks; ix++) {
vp = ccd->ccd_vpp[ix];
ci = &cs->sc_cinfo[ix];
@@ -373,9 +372,8 @@ ccdinit(struct ccddevice *ccd, char **cpaths, struct proc *p)
minsize = size;
ci->ci_size = size;
cs->sc_size += size;
- rpm += dpart.disklab->d_rpm;
}
- ccg->ccg_rpm = rpm / cs->sc_nccdisks;
+ ccg->ccg_rpm = 0;
/*
* Don't allow the interleave to be smaller than
@@ -1367,12 +1365,10 @@ ccdgetdisklabel(dev_t dev, struct ccd_softc *cs, struct disklabel *lp,
lp->d_ntracks = ccg->ccg_ntracks;
lp->d_ncylinders = ccg->ccg_ncylinders;
lp->d_secpercyl = lp->d_ntracks * lp->d_nsectors;
- lp->d_rpm = ccg->ccg_rpm;
strncpy(lp->d_typename, "ccd", sizeof(lp->d_typename));
lp->d_type = DTYPE_CCD;
strncpy(lp->d_packname, "fictitious", sizeof(lp->d_packname));
- lp->d_interleave = 1;
lp->d_flags = 0;
lp->d_version = 1;
diff --git a/sys/dev/flash.c b/sys/dev/flash.c
index 9843c9df653..ec5eebd53d4 100644
--- a/sys/dev/flash.c
+++ b/sys/dev/flash.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: flash.c,v 1.14 2009/10/13 19:33:16 pirofti Exp $ */
+/* $OpenBSD: flash.c,v 1.15 2010/04/23 15:25:21 jsing Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@openbsd.org>
@@ -990,9 +990,6 @@ flashgetdefaultlabel(dev_t dev, struct flash_softc *sc,
lp->d_secpercyl = lp->d_ntracks * lp->d_nsectors;
DL_SETDSIZE(lp, (daddr64_t)lp->d_ncylinders * lp->d_secpercyl);
- /* Fake hardware characteristics. */
- lp->d_rpm = 3600;
- lp->d_interleave = 1;
lp->d_version = 1;
/* XXX these values assume ffs. */
diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c
index 95063c927ee..a7a5f69dbd5 100644
--- a/sys/dev/isa/fd.c
+++ b/sys/dev/isa/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.83 2009/09/12 01:23:30 krw Exp $ */
+/* $OpenBSD: fd.c,v 1.84 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */
/*-
@@ -169,11 +169,9 @@ fdgetdisklabel(dev_t dev, struct fd_softc *fd, struct disklabel *lp,
lp->d_ncylinders = fd->sc_type->tracks;
lp->d_ntracks = fd->sc_type->heads; /* Go figure... */
DL_SETDSIZE(lp, fd->sc_type->size);
- lp->d_rpm = 300; /* XXX like it matters... */
strncpy(lp->d_typename, "floppy disk", sizeof(lp->d_typename));
strncpy(lp->d_packname, "fictitious", sizeof(lp->d_packname));
- lp->d_interleave = 1;
lp->d_version = 1;
lp->d_magic = DISKMAGIC;
diff --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c
index 1e96f0d2efa..77384462158 100644
--- a/sys/dev/isa/mcd.c
+++ b/sys/dev/isa/mcd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mcd.c,v 1.52 2009/08/24 08:51:18 jasper Exp $ */
+/* $OpenBSD: mcd.c,v 1.53 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: mcd.c,v 1.60 1998/01/14 12:14:41 drochner Exp $ */
/*
@@ -753,8 +753,6 @@ mcdgetdisklabel(dev, sc, lp, spoofonly)
lp->d_type = DTYPE_SCSI; /* XXX */
strncpy(lp->d_packname, "fictitious", sizeof lp->d_packname);
DL_SETDSIZE(lp, sc->disksize);
- lp->d_rpm = 300;
- lp->d_interleave = 1;
lp->d_version = 1;
lp->d_magic = DISKMAGIC;
diff --git a/sys/dev/raidframe/rf_openbsdkintf.c b/sys/dev/raidframe/rf_openbsdkintf.c
index a6d785600a5..971a07a9a53 100644
--- a/sys/dev/raidframe/rf_openbsdkintf.c
+++ b/sys/dev/raidframe/rf_openbsdkintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rf_openbsdkintf.c,v 1.53 2009/10/13 19:33:17 pirofti Exp $ */
+/* $OpenBSD: rf_openbsdkintf.c,v 1.54 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: rf_netbsdkintf.c,v 1.109 2001/07/27 03:30:07 oster Exp $ */
/*-
@@ -2082,9 +2082,7 @@ raidgetdefaultlabel(RF_Raid_t *raidPtr, struct raid_softc *rs,
strncpy(lp->d_typename, "raid", sizeof(lp->d_typename));
lp->d_type = DTYPE_RAID;
strncpy(lp->d_packname, "fictitious", sizeof(lp->d_packname));
- lp->d_rpm = 3600;
lp->d_flags = 0;
- lp->d_interleave = 1;
lp->d_version = 1;
DL_SETPOFFSET(&lp->d_partitions[RAW_PART], 0);
diff --git a/sys/dev/ramdisk.c b/sys/dev/ramdisk.c
index 4f11b453ff0..6d8469d1e33 100644
--- a/sys/dev/ramdisk.c
+++ b/sys/dev/ramdisk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ramdisk.c,v 1.45 2009/10/13 19:33:16 pirofti Exp $ */
+/* $OpenBSD: ramdisk.c,v 1.46 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: ramdisk.c,v 1.8 1996/04/12 08:30:09 leo Exp $ */
/*
@@ -504,8 +504,6 @@ rdgetdisklabel(dev_t dev, struct rd_softc *sc, struct disklabel *lp,
lp->d_type = DTYPE_SCSI;
strncpy(lp->d_packname, "fictitious", sizeof(lp->d_packname));
DL_SETDSIZE(lp, lp->d_nsectors);
- lp->d_rpm = 3600;
- lp->d_interleave = 1;
lp->d_version = 1;
lp->d_magic = DISKMAGIC;
diff --git a/sys/dev/sun/disklabel.h b/sys/dev/sun/disklabel.h
index 2a83b008ed6..934d9387e36 100644
--- a/sys/dev/sun/disklabel.h
+++ b/sys/dev/sun/disklabel.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: disklabel.h,v 1.6 2007/10/02 03:26:59 krw Exp $ */
+/* $OpenBSD: disklabel.h,v 1.7 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: disklabel.h,v 1.2 1998/08/22 14:55:28 mrg Exp $ */
/*
@@ -86,11 +86,13 @@ struct sun_disklabel { /* total size = 512 bytes */
u_char sl_types[MAXPARTITIONS];
u_int8_t sl_fragblock[MAXPARTITIONS];
u_int16_t sl_cpg[MAXPARTITIONS];
+ u_int64_t sl_label_uid;
char sl_xxx1[292 - sizeof(u_int) - sizeof(u_int) -
(sizeof(struct sun_dkpart) * SUNXPART) -
sizeof(u_char) * MAXPARTITIONS -
sizeof(u_int8_t) * MAXPARTITIONS -
- sizeof(u_int16_t) * MAXPARTITIONS];
+ sizeof(u_int16_t) * MAXPARTITIONS -
+ sizeof(u_int64_t)];
u_short sl_rpm; /* rotational speed */
u_short sl_pcylinders; /* number of physical cyls */
#define sl_pcyl sl_pcylinders /* XXX: old sun3 */
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index 1df2b5202d4..04d241f8a6f 100644
--- a/sys/dev/vnd.c
+++ b/sys/dev/vnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnd.c,v 1.95 2009/08/24 08:51:18 jasper Exp $ */
+/* $OpenBSD: vnd.c,v 1.96 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */
/*
@@ -316,8 +316,6 @@ vndgetdisklabel(dev_t dev, struct vnd_softc *sc, struct disklabel *lp,
lp->d_type = DTYPE_VND;
strncpy(lp->d_packname, "fictitious", sizeof(lp->d_packname));
DL_SETDSIZE(lp, sc->sc_size);
- lp->d_rpm = 3600;
- lp->d_interleave = 1;
lp->d_flags = 0;
lp->d_version = 1;
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index 659a401c795..53638585e6c 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_disk.c,v 1.99 2010/01/14 23:12:11 schwarze Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.100 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
@@ -278,13 +278,10 @@ checkdisklabel(void *rlp, struct disklabel *lp,
dlp->d_secpercyl = swap32(dlp->d_secpercyl);
dlp->d_secperunit = swap32(dlp->d_secperunit);
- dlp->d_sparespertrack = swap16(dlp->d_sparespertrack);
- dlp->d_sparespercyl = swap16(dlp->d_sparespercyl);
+ dlp->d_label_uid = swap64(dlp->d_label_uid);
dlp->d_acylinders = swap32(dlp->d_acylinders);
- dlp->d_rpm = swap16(dlp->d_rpm);
- dlp->d_interleave = swap16(dlp->d_interleave);
dlp->d_flags = swap32(dlp->d_flags);
for (i = 0; i < NDDATA; i++)
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index 3f49a9a1e5c..bb876022113 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd.c,v 1.165 2010/04/12 09:51:48 dlg Exp $ */
+/* $OpenBSD: cd.c,v 1.166 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */
/*
@@ -1198,8 +1198,6 @@ cdgetdisklabel(dev_t dev, struct cd_softc *sc, struct disklabel *lp,
strncpy(lp->d_packname, "fictitious", sizeof(lp->d_packname));
DL_SETDSIZE(lp, sc->sc_params.disksize);
- lp->d_rpm = 300;
- lp->d_interleave = 1;
lp->d_version = 1;
/* XXX - these values for BBSIZE and SBSIZE assume ffs */
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index a6d9ba5adab..9a78e581019 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.184 2010/04/12 09:51:48 dlg Exp $ */
+/* $OpenBSD: sd.c,v 1.185 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -1044,8 +1044,6 @@ sdgetdisklabel(dev_t dev, struct sd_softc *sc, struct disklabel *lp,
bcopy(packname, lp->d_packname, len);
DL_SETDSIZE(lp, sc->params.disksize);
- lp->d_rpm = sc->params.rot_rate;
- lp->d_interleave = 1;
lp->d_version = 1;
lp->d_flags = 0;
diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h
index 40ca7c4ff93..8b3a68fee3e 100644
--- a/sys/sys/disklabel.h
+++ b/sys/sys/disklabel.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: disklabel.h,v 1.46 2009/08/13 15:23:11 deraadt Exp $ */
+/* $OpenBSD: disklabel.h,v 1.47 2010/04/23 15:25:21 jsing Exp $ */
/* $NetBSD: disklabel.h,v 1.41 1996/05/10 23:07:37 mark Exp $ */
/*
@@ -108,14 +108,8 @@ struct disklabel {
u_int32_t d_secpercyl; /* # of data sectors per cylinder */
u_int32_t d_secperunit; /* # of data sectors per unit */
- /*
- * Spares (bad sector replacements) below are not counted in
- * d_nsectors or d_secpercyl. Spare sectors are assumed to
- * be physical sectors which occupy space at the end of each
- * track and/or cylinder.
- */
- u_int16_t d_sparespertrack; /* # of spare sectors per track */
- u_int16_t d_sparespercyl; /* # of spare sectors per cylinder */
+ u_int64_t d_label_uid; /* Unique label identifier. */
+
/*
* Alternate cylinders include maintenance, replacement, configuration
* description areas, etc.
@@ -123,24 +117,6 @@ struct disklabel {
u_int32_t d_acylinders; /* # of alt. cylinders per unit */
/* hardware characteristics: */
- /*
- * d_interleave, d_trackskew and d_cylskew describe perturbations
- * in the media format used to compensate for a slow controller.
- * Interleave is physical sector interleave, set up by the
- * formatter or controller when formatting. When interleaving is
- * in use, logically adjacent sectors are not physically
- * contiguous, but instead are separated by some number of
- * sectors. It is specified as the ratio of physical sectors
- * traversed per logical sector. Thus an interleave of 1:1
- * implies contiguous layout, while 2:1 implies that logical
- * sector 0 is separated by one sector from logical sector 1.
- * d_trackskew is the offset of sector 0 on track N relative to
- * sector 0 on track N-1 on the same cylinder. Finally, d_cylskew
- * is the offset of sector 0 on cylinder N relative to sector 0
- * on cylinder N-1.
- */
- u_int16_t d_rpm; /* rotational speed */
- u_int16_t d_interleave; /* hardware sector interleave */
u_int16_t d_bstarth; /* start of useable region (high part) */
u_int16_t d_bendh; /* size of useable region (high part) */
u_int32_t d_bstart; /* start of useable region */