summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-03-13 21:05:25 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-03-13 21:05:25 +0000
commit14e24e6dfa3e04b3ec4b2c1534a090ba2e286366 (patch)
treee04e00ef2552f7146a9c0a7611badcdf86be5a01
parente904cb7a39c8410f24a10d2ac0419cec1f6cf91b (diff)
Nuke __HAVE_OLD_DISKLABEL code, this was never defined anyway.
-rw-r--r--sys/arch/vax/mscp/mscp_disk.c59
1 files changed, 2 insertions, 57 deletions
diff --git a/sys/arch/vax/mscp/mscp_disk.c b/sys/arch/vax/mscp/mscp_disk.c
index 1a3690bd8e4..8f84693992b 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.18 2007/02/15 00:53:26 krw Exp $ */
+/* $OpenBSD: mscp_disk.c,v 1.19 2007/03/13 21:05:24 miod Exp $ */
/* $NetBSD: mscp_disk.c,v 1.30 2001/11/13 07:38:28 lukem Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -369,9 +369,6 @@ raioctl(dev, cmd, data, flag, p)
struct disklabel *lp, *tp;
struct ra_softc *ra = ra_cd.cd_devs[unit];
int error = 0;
-#ifdef __HAVE_OLD_DISKLABEL
- struct disklabel newlabel;
-#endif
lp = ra->ra_disk.dk_label;
@@ -380,14 +377,6 @@ raioctl(dev, cmd, data, flag, p)
case DIOCGDINFO:
bcopy(lp, data, sizeof (struct disklabel));
break;
-#ifdef __HAVE_OLD_DISKLABEL
- case ODIOCGDINFO:
- bcopy(lp, &newlabel, sizeof disklabel);
- if (newlabel.d_npartitions > OLDMAXPARTITIONS)
- return ENOTTY;
- bcopy(&newlabel, data, sizeof (struct olddisklabel));
- break;
-#endif
case DIOCGPART:
((struct partinfo *)data)->disklab = lp;
@@ -397,27 +386,13 @@ raioctl(dev, cmd, data, flag, p)
case DIOCWDINFO:
case DIOCSDINFO:
-#ifdef __HAVE_OLD_DISKLABEL
- case ODIOCWDINFO:
- case ODIOCSDINFO:
- if (cmd == ODIOCSDINFO || xfer == ODIOCWDINFO) {
- memset(&newlabel, 0, sizeof newlabel);
- memcpy(&newlabel, data, sizeof (struct olddisklabel));
- tp = &newlabel;
- } else
-#endif
tp = (struct disklabel *)data;
if ((flag & FWRITE) == 0)
error = EBADF;
else {
error = setdisklabel(lp, tp, 0, 0);
- if ((error == 0) && (cmd == DIOCWDINFO
-#ifdef __HAVE_OLD_DISKLABEL
- || cmd == ODIOCWDINFO
-#else
- )) {
-#endif
+ if (error == 0 && cmd == DIOCWDINFO) {
ra->ra_wlabel = 1;
error = writedisklabel(dev, rastrategy, lp,0);
ra->ra_wlabel = 0;
@@ -432,36 +407,6 @@ raioctl(dev, cmd, data, flag, p)
ra->ra_wlabel = 1;
break;
-#ifdef __NetBSD__
- case DIOCGDEFLABEL:
-#ifdef __HAVE_OLD_DISKLABEL
- case ODIOCGDEFLABEL:
- if (cmd == ODIOCGDEFLABEL)
- tp = &newlabel;
- else
-#else
- tp = (struct disklabel *)data;
-#endif
- bzero(tp, sizeof(struct disklabel));
- tp->d_secsize = lp->d_secsize;
- tp->d_nsectors = lp->d_nsectors;
- tp->d_ntracks = lp->d_ntracks;
- tp->d_ncylinders = lp->d_ncylinders;
- tp->d_secpercyl = lp->d_secpercyl;
- tp->d_secperunit = lp->d_secperunit;
- tp->d_type = DTYPE_MSCP;
- tp->d_rpm = 3600;
- rrmakelabel(tp, ra->ra_mediaid);
-#ifdef __HAVE_OLD_DISKLABEL
- if (cmd == ODIOCGDEFLABEL) {
- if (tp->d_npartitions > OLDMAXPARTITIONS)
- return ENOTTY;
- memcpy(data, tp, sizeof (struct olddisklabel));
- }
-#endif
- break;
-#endif /* __NetBSD__ */
-
default:
error = ENOTTY;
break;