summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2006-09-26 23:33:05 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2006-09-26 23:33:05 +0000
commit2bf9309e28746a4b6a52286fbfaa52035e8bc80e (patch)
tree1a0c40b9e97feb2a6762ccc9486778b4e20fb856
parentecd84bf31bad64b35b9fc94c35074f968296f988 (diff)
Zap D_REMOVABLE flag from disklabel. If you didn't already know that
floppies and cd's were removable, displaying that fact in disklabel output was unlikely to help. And the display in disklabel was the only use of D_REMOVABLE in the tree. ok marco@
-rw-r--r--lib/libc/gen/disklabel.c2
-rw-r--r--sbin/disklabel/disklabel.c8
-rw-r--r--sys/arch/amd64/stand/libsa/diskprobe.c3
-rw-r--r--sys/arch/i386/stand/libsa/diskprobe.c3
-rw-r--r--sys/arch/sparc/dev/fd.c3
-rw-r--r--sys/arch/sparc64/dev/fd.c3
-rw-r--r--sys/dev/isa/fd.c3
-rw-r--r--sys/dev/isa/mcd.c3
-rw-r--r--sys/scsi/cd.c3
-rw-r--r--sys/sys/disklabel.h3
10 files changed, 10 insertions, 24 deletions
diff --git a/lib/libc/gen/disklabel.c b/lib/libc/gen/disklabel.c
index dc1adeff8fa..ad5148e0cde 100644
--- a/lib/libc/gen/disklabel.c
+++ b/lib/libc/gen/disklabel.c
@@ -75,8 +75,6 @@ getdiskbyname(const char *name)
cgetstr(buf, "b0", &dp->d_boot0);
cgetstr(buf, "b1", &dp->d_boot1);
- if (cgetstr(buf, "ty", &cq) > 0 && strcmp(cq, "removable") == 0)
- dp->d_flags |= D_REMOVABLE;
if (cgetcap(buf, "sf", ':') != NULL)
dp->d_flags |= D_BADSECT;
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c
index fccd0e15595..a723b098bb5 100644
--- a/sbin/disklabel/disklabel.c
+++ b/sbin/disklabel/disklabel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disklabel.c,v 1.99 2006/09/24 20:29:52 krw Exp $ */
+/* $OpenBSD: disklabel.c,v 1.100 2006/09/26 23:33:04 krw Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -39,7 +39,7 @@ static const char copyright[] =
#endif /* not lint */
#ifndef lint
-static const char rcsid[] = "$OpenBSD: disklabel.c,v 1.99 2006/09/24 20:29:52 krw Exp $";
+static const char rcsid[] = "$OpenBSD: disklabel.c,v 1.100 2006/09/26 23:33:04 krw Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -1071,8 +1071,6 @@ display(FILE *f, struct disklabel *lp, char **mp, char unit, int edit,
fprintf(f, "label: %.*s\n", (int)sizeof(lp->d_packname), lp->d_packname);
if (!edit) {
fprintf(f, "flags:");
- if (lp->d_flags & D_REMOVABLE)
- fprintf(f, " removable");
if (lp->d_flags & D_BADSECT)
fprintf(f, " badsect");
putc('\n', f);
@@ -1334,8 +1332,6 @@ getasciilabel(FILE *f, struct disklabel *lp)
if (!strcmp(cp, "flags")) {
for (v = 0; (cp = tp) && *cp != '\0';) {
tp = word(cp);
- if (!strcmp(cp, "removable"))
- v |= D_REMOVABLE;
else if (!strcmp(cp, "badsect"))
v |= D_BADSECT;
else {
diff --git a/sys/arch/amd64/stand/libsa/diskprobe.c b/sys/arch/amd64/stand/libsa/diskprobe.c
index ddb8990b963..d728a5a7ae0 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.3 2004/08/21 18:53:38 tom Exp $ */
+/* $OpenBSD: diskprobe.c,v 1.4 2006/09/26 23:33:04 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -255,7 +255,6 @@ cdprobe(void)
dip->disklabel.d_secperunit = 100;
dip->disklabel.d_rpm = 300;
dip->disklabel.d_interleave = 1;
- dip->disklabel.d_flags = D_REMOVABLE;
dip->disklabel.d_bbsize = 2048;
dip->disklabel.d_sbsize = 2048;
diff --git a/sys/arch/i386/stand/libsa/diskprobe.c b/sys/arch/i386/stand/libsa/diskprobe.c
index 838117b6a7c..d44228245e1 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.27 2004/06/23 00:21:49 tom Exp $ */
+/* $OpenBSD: diskprobe.c,v 1.28 2006/09/26 23:33:04 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -259,7 +259,6 @@ cdprobe(void)
dip->disklabel.d_secperunit = 100;
dip->disklabel.d_rpm = 300;
dip->disklabel.d_interleave = 1;
- dip->disklabel.d_flags = D_REMOVABLE;
dip->disklabel.d_bbsize = 2048;
dip->disklabel.d_sbsize = 2048;
diff --git a/sys/arch/sparc/dev/fd.c b/sys/arch/sparc/dev/fd.c
index 77d353c2e3b..3642726a299 100644
--- a/sys/arch/sparc/dev/fd.c
+++ b/sys/arch/sparc/dev/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.44 2006/03/15 20:20:41 miod Exp $ */
+/* $OpenBSD: fd.c,v 1.45 2006/09/26 23:33:04 krw Exp $ */
/* $NetBSD: fd.c,v 1.51 1997/05/24 20:16:19 pk Exp $ */
/*-
@@ -1972,7 +1972,6 @@ fdgetdisklabel(dev)
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_flags = D_REMOVABLE;
lp->d_partitions[RAW_PART].p_offset = 0;
lp->d_partitions[RAW_PART].p_size = lp->d_secpercyl * lp->d_ncylinders;
diff --git a/sys/arch/sparc64/dev/fd.c b/sys/arch/sparc64/dev/fd.c
index 750966ffab7..04f71364c2c 100644
--- a/sys/arch/sparc64/dev/fd.c
+++ b/sys/arch/sparc64/dev/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.6 2006/03/15 20:20:41 miod Exp $ */
+/* $OpenBSD: fd.c,v 1.7 2006/09/26 23:33:04 krw Exp $ */
/* $NetBSD: fd.c,v 1.112 2003/08/07 16:29:35 agc Exp $ */
/*-
@@ -2021,7 +2021,6 @@ fdgetdisklabel(dev)
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_flags = D_REMOVABLE;
lp->d_partitions[RAW_PART].p_offset = 0;
lp->d_partitions[RAW_PART].p_size = lp->d_secpercyl * lp->d_ncylinders;
diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c
index 028b436cef8..8b584f0eb97 100644
--- a/sys/dev/isa/fd.c
+++ b/sys/dev/isa/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.55 2006/08/13 16:24:12 krw Exp $ */
+/* $OpenBSD: fd.c,v 1.56 2006/09/26 23:33:04 krw Exp $ */
/* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */
/*-
@@ -985,7 +985,6 @@ fdioctl(dev, cmd, addr, flag, p)
lp->d_secperunit = fd->sc_type->size;
lp->d_rpm = 300;
lp->d_interleave = 1;
- lp->d_flags = D_REMOVABLE;
lp->d_partitions[RAW_PART].p_offset = 0;
lp->d_partitions[RAW_PART].p_size = lp->d_secperunit;
diff --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c
index 47cb7b5cafd..e9e7cca0fa7 100644
--- a/sys/dev/isa/mcd.c
+++ b/sys/dev/isa/mcd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mcd.c,v 1.40 2006/08/13 16:24:13 krw Exp $ */
+/* $OpenBSD: mcd.c,v 1.41 2006/09/26 23:33:04 krw Exp $ */
/* $NetBSD: mcd.c,v 1.60 1998/01/14 12:14:41 drochner Exp $ */
/*
@@ -735,7 +735,6 @@ mcdgetdisklabel(dev, sc, lp, clp, spoofonly)
lp->d_secperunit = sc->disksize;
lp->d_rpm = 300;
lp->d_interleave = 1;
- lp->d_flags = D_REMOVABLE;
lp->d_partitions[RAW_PART].p_offset = 0;
lp->d_partitions[RAW_PART].p_size = lp->d_secperunit;
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index 5cee420fd60..b99bfac1f06 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd.c,v 1.110 2006/07/29 02:40:45 krw Exp $ */
+/* $OpenBSD: cd.c,v 1.111 2006/09/26 23:33:04 krw Exp $ */
/* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */
/*
@@ -1196,7 +1196,6 @@ cdgetdisklabel(dev, cd, lp, clp, spoofonly)
lp->d_secperunit = cd->params.disksize;
lp->d_rpm = 300;
lp->d_interleave = 1;
- lp->d_flags = D_REMOVABLE;
/* XXX - these values for BBSIZE and SBSIZE assume ffs */
lp->d_bbsize = BBSIZE;
diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h
index 08d840d2cf4..a80c265aa10 100644
--- a/sys/sys/disklabel.h
+++ b/sys/sys/disklabel.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: disklabel.h,v 1.27 2006/09/24 20:29:52 krw Exp $ */
+/* $OpenBSD: disklabel.h,v 1.28 2006/09/26 23:33:04 krw Exp $ */
/* $NetBSD: disklabel.h,v 1.41 1996/05/10 23:07:37 mark Exp $ */
/*
@@ -306,7 +306,6 @@ static char *fstypesnames[] = {
/*
* flags shared by various drives:
*/
-#define D_REMOVABLE 0x01 /* removable media */
#define D_BADSECT 0x04 /* supports bad sector forw. */
/*