summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/sparc/dev/xd.c7
-rw-r--r--sys/arch/sparc/dev/xy.c7
-rw-r--r--sys/dev/ofw/ofdisk.c9
-rw-r--r--sys/dev/vnd.c5
4 files changed, 11 insertions, 17 deletions
diff --git a/sys/arch/sparc/dev/xd.c b/sys/arch/sparc/dev/xd.c
index 1aa62b5e11e..accb5f40fa3 100644
--- a/sys/arch/sparc/dev/xd.c
+++ b/sys/arch/sparc/dev/xd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xd.c,v 1.34 2007/02/15 00:53:26 krw Exp $ */
+/* $OpenBSD: xd.c,v 1.35 2007/04/29 18:59:37 krw Exp $ */
/* $NetBSD: xd.c,v 1.37 1997/07/29 09:58:16 fair Exp $ */
/*
@@ -888,9 +888,8 @@ xdioctl(dev, command, addr, flag, p)
/* Simulate opening partition 0 so write succeeds. */
xd->sc_dk.dk_openmask |= (1 << 0);
- error = writedisklabel(MAKEDISKDEV(major(dev), DISKUNIT(dev), RAW_PART),
- xdstrategy, xd->sc_dk.dk_label,
- xd->sc_dk.dk_cpulabel);
+ error = writedisklabel(DISKLABELDEV(dev), xdstrategy,
+ xd->sc_dk.dk_label, xd->sc_dk.dk_cpulabel);
xd->sc_dk.dk_openmask =
xd->sc_dk.dk_copenmask | xd->sc_dk.dk_bopenmask;
}
diff --git a/sys/arch/sparc/dev/xy.c b/sys/arch/sparc/dev/xy.c
index b89291a05f1..5ad979a6d5d 100644
--- a/sys/arch/sparc/dev/xy.c
+++ b/sys/arch/sparc/dev/xy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xy.c,v 1.30 2007/02/15 00:53:26 krw Exp $ */
+/* $OpenBSD: xy.c,v 1.31 2007/04/29 18:59:37 krw Exp $ */
/* $NetBSD: xy.c,v 1.26 1997/07/19 21:43:56 pk Exp $ */
/*
@@ -849,9 +849,8 @@ xyioctl(dev, command, addr, flag, p)
/* Simulate opening partition 0 so write succeeds. */
xy->sc_dk.dk_openmask |= (1 << 0);
- error = writedisklabel(MAKEDISKDEV(major(dev), DISKUNIT(dev), RAW_PART),
- xystrategy, xy->sc_dk.dk_label,
- xy->sc_dk.dk_cpulabel);
+ error = writedisklabel(DISKLABELDEV(dev), xystrategy,
+ xy->sc_dk.dk_label, xy->sc_dk.dk_cpulabel);
xy->sc_dk.dk_openmask =
xy->sc_dk.dk_copenmask | xy->sc_dk.dk_bopenmask;
}
diff --git a/sys/dev/ofw/ofdisk.c b/sys/dev/ofw/ofdisk.c
index 5deea0c8146..69f4fe31d46 100644
--- a/sys/dev/ofw/ofdisk.c
+++ b/sys/dev/ofw/ofdisk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofdisk.c,v 1.10 2006/03/15 20:20:41 miod Exp $ */
+/* $OpenBSD: ofdisk.c,v 1.11 2007/04/29 18:59:37 krw Exp $ */
/* $NetBSD: ofdisk.c,v 1.3 1996/10/13 01:38:13 christos Exp $ */
/*
@@ -312,11 +312,8 @@ ofdioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
(struct disklabel *)data, /*of->sc_dk.dk_openmask */0,
of->sc_dk.dk_cpulabel);
if (error == 0 && cmd == DIOCWDINFO)
- error = writedisklabel(MAKEDISKDEV(major(dev),
- DISKUNIT(dev), RAW_PART),
- ofdstrategy,
- of->sc_dk.dk_label,
- of->sc_dk.dk_cpulabel);
+ error = writedisklabel(DISKLABELDEV(dev), ofdstrategy,
+ of->sc_dk.dk_label, of->sc_dk.dk_cpulabel);
return error;
default:
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index 3dc563ea87f..932130f206c 100644
--- a/sys/dev/vnd.c
+++ b/sys/dev/vnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnd.c,v 1.72 2007/03/25 21:52:27 tedu Exp $ */
+/* $OpenBSD: vnd.c,v 1.73 2007/04/29 18:59:37 krw Exp $ */
/* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */
/*
@@ -914,8 +914,7 @@ vndioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
vnd->sc_dk.dk_cpulabel);
if (error == 0) {
if (cmd == DIOCWDINFO)
- error = writedisklabel(MAKEDISKDEV(major(dev),
- DISKUNIT(dev), RAW_PART),
+ error = writedisklabel(DISKLABELDEV(dev),
vndstrategy, vnd->sc_dk.dk_label,
vnd->sc_dk.dk_cpulabel);
}