summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-06-20 18:16:25 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-06-20 18:16:25 +0000
commitaaf22f2a2583ce8064f71e5198415e94fec6c2f0 (patch)
treea593987de55f357ca3ffce304e55a368e144e79b /sys
parent873db335f698dc92ad5bb1724185b94b78cadc90 (diff)
b_cylinder does not need to be set on the callpath down into drivers.
cpu_disklabel can go away, since nothing anymore needs to use it.. except these two drivers. knock out that code for now to let it compile while miod gets his fix ready for these drivers.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc/dev/xd.c19
-rw-r--r--sys/arch/sparc/dev/xy.c20
2 files changed, 20 insertions, 19 deletions
diff --git a/sys/arch/sparc/dev/xd.c b/sys/arch/sparc/dev/xd.c
index 1eb41c0c294..3bae1112c51 100644
--- a/sys/arch/sparc/dev/xd.c
+++ b/sys/arch/sparc/dev/xd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xd.c,v 1.38 2007/06/07 03:42:51 deraadt Exp $ */
+/* $OpenBSD: xd.c,v 1.39 2007/06/20 18:16:24 deraadt Exp $ */
/* $NetBSD: xd.c,v 1.37 1997/07/29 09:58:16 fair Exp $ */
/*
@@ -296,7 +296,6 @@ xdgetdisklabel(xd, b)
void *b;
{
char *err;
- struct sun_disklabel *sdl;
/* We already have the label data in `b'; setup for dummy strategy */
xd_labeldata = b;
@@ -307,12 +306,15 @@ xdgetdisklabel(xd, b)
err = readdisklabel(MAKEDISKDEV(0, xd->sc_dev.dv_unit, RAW_PART),
xddummystrat,
- xd->sc_dk.dk_label, xd->sc_dk.dk_cpulabel, 0);
+ xd->sc_dk.dk_label, 0);
if (err) {
/*printf("%s: %s\n", xd->sc_dev.dv_xname, err);*/
return(XD_ERR_FAIL);
}
+#ifdef FIXME
+ struct sun_disklabel *sdl;
+
/* Ok, we have the label; fill in `pcyl' if there's SunOS magic */
sdl = (struct sun_disklabel *)xd->sc_dk.dk_cpulabel->cd_block;
if (sdl->sl_magic == SUN_DKMAGIC)
@@ -325,6 +327,7 @@ xdgetdisklabel(xd, b)
printf("%s: WARNING: guessing pcyl=%d (ncyl+acyl)\n",
xd->sc_dev.dv_xname, xd->pcyl);
}
+#endif
xd->ncyl = xd->sc_dk.dk_label->d_ncylinders;
xd->acyl = xd->sc_dk.dk_label->d_acylinders;
@@ -859,8 +862,7 @@ xdioctl(dev, command, addr, flag, p)
if ((flag & FWRITE) == 0)
return EBADF;
error = setdisklabel(xd->sc_dk.dk_label,
- (struct disklabel *) addr, /* xd->sc_dk.dk_openmask : */ 0,
- xd->sc_dk.dk_cpulabel);
+ (struct disklabel *) addr, /* xd->sc_dk.dk_openmask : */ 0);
if (error == 0) {
if (xd->state == XD_DRIVE_NOLABEL)
xd->state = XD_DRIVE_ONLINE;
@@ -880,8 +882,7 @@ xdioctl(dev, command, addr, flag, p)
if ((flag & FWRITE) == 0)
return EBADF;
error = setdisklabel(xd->sc_dk.dk_label,
- (struct disklabel *) addr, /* xd->sc_dk.dk_openmask : */ 0,
- xd->sc_dk.dk_cpulabel);
+ (struct disklabel *) addr, /* xd->sc_dk.dk_openmask : */ 0);
if (error == 0) {
if (xd->state == XD_DRIVE_NOLABEL)
xd->state = XD_DRIVE_ONLINE;
@@ -889,7 +890,7 @@ xdioctl(dev, command, addr, flag, p)
/* Simulate opening partition 0 so write succeeds. */
xd->sc_dk.dk_openmask |= (1 << 0);
error = writedisklabel(DISKLABELDEV(dev), xdstrategy,
- xd->sc_dk.dk_label, xd->sc_dk.dk_cpulabel);
+ xd->sc_dk.dk_label);
xd->sc_dk.dk_openmask =
xd->sc_dk.dk_copenmask | xd->sc_dk.dk_bopenmask;
}
@@ -1070,7 +1071,7 @@ xdstrategy(bp)
* completion. */
if (bounds_check_with_label(bp, xd->sc_dk.dk_label,
- xd->sc_dk.dk_cpulabel, (xd->flags & XD_WLABEL) != 0) <= 0)
+ (xd->flags & XD_WLABEL) != 0) <= 0)
goto done;
/*
diff --git a/sys/arch/sparc/dev/xy.c b/sys/arch/sparc/dev/xy.c
index 5d0caa4fceb..93a210c86ef 100644
--- a/sys/arch/sparc/dev/xy.c
+++ b/sys/arch/sparc/dev/xy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xy.c,v 1.35 2007/06/07 14:38:39 deraadt Exp $ */
+/* $OpenBSD: xy.c,v 1.36 2007/06/20 18:16:24 deraadt Exp $ */
/* $NetBSD: xy.c,v 1.26 1997/07/19 21:43:56 pk Exp $ */
/*
@@ -236,7 +236,6 @@ xygetdisklabel(xy, b)
void *b;
{
char *err;
- struct sun_disklabel *sdl;
/* We already have the label data in `b'; setup for dummy strategy */
xy_labeldata = b;
@@ -246,13 +245,15 @@ xygetdisklabel(xy, b)
xy->sc_dk.dk_label->d_secpercyl = 1;
err = readdisklabel(MAKEDISKDEV(0, xy->sc_dev.dv_unit, RAW_PART),
- xydummystrat,
- xy->sc_dk.dk_label, xy->sc_dk.dk_cpulabel, 0);
+ xydummystrat, xy->sc_dk.dk_label, 0);
if (err) {
/*printf("%s: %s\n", xy->sc_dev.dv_xname, err);*/
return(XY_ERR_FAIL);
}
+#ifdef FIXME
+ struct sun_disklabel *sdl;
+
/* Ok, we have the label; fill in `pcyl' if there's SunOS magic */
sdl = (struct sun_disklabel *)xy->sc_dk.dk_cpulabel->cd_block;
if (sdl->sl_magic == SUN_DKMAGIC)
@@ -265,6 +266,7 @@ xygetdisklabel(xy, b)
printf("%s: WARNING: guessing pcyl=%d (ncyl+acyl)\n",
xy->sc_dev.dv_xname, xy->pcyl);
}
+#endif
xy->ncyl = xy->sc_dk.dk_label->d_ncylinders;
xy->acyl = xy->sc_dk.dk_label->d_acylinders;
@@ -820,8 +822,7 @@ xyioctl(dev, command, addr, flag, p)
if ((flag & FWRITE) == 0)
return EBADF;
error = setdisklabel(xy->sc_dk.dk_label,
- (struct disklabel *) addr, /* xy->sc_dk.dk_openmask : */ 0,
- xy->sc_dk.dk_cpulabel);
+ (struct disklabel *) addr, /* xy->sc_dk.dk_openmask : */ 0);
if (error == 0) {
if (xy->state == XY_DRIVE_NOLABEL)
xy->state = XY_DRIVE_ONLINE;
@@ -841,8 +842,7 @@ xyioctl(dev, command, addr, flag, p)
if ((flag & FWRITE) == 0)
return EBADF;
error = setdisklabel(xy->sc_dk.dk_label,
- (struct disklabel *) addr, /* xy->sc_dk.dk_openmask : */ 0,
- xy->sc_dk.dk_cpulabel);
+ (struct disklabel *) addr, /* xy->sc_dk.dk_openmask : */ 0);
if (error == 0) {
if (xy->state == XY_DRIVE_NOLABEL)
xy->state = XY_DRIVE_ONLINE;
@@ -850,7 +850,7 @@ xyioctl(dev, command, addr, flag, p)
/* Simulate opening partition 0 so write succeeds. */
xy->sc_dk.dk_openmask |= (1 << 0);
error = writedisklabel(DISKLABELDEV(dev), xystrategy,
- xy->sc_dk.dk_label, xy->sc_dk.dk_cpulabel);
+ xy->sc_dk.dk_label);
xy->sc_dk.dk_openmask =
xy->sc_dk.dk_copenmask | xy->sc_dk.dk_bopenmask;
}
@@ -1032,7 +1032,7 @@ xystrategy(bp)
* completion. */
if (bounds_check_with_label(bp, xy->sc_dk.dk_label,
- xy->sc_dk.dk_cpulabel, (xy->flags & XY_WLABEL) != 0) <= 0)
+ (xy->flags & XY_WLABEL) != 0) <= 0)
goto done;
/*