diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2009-06-04 05:57:28 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2009-06-04 05:57:28 +0000 |
commit | 773d991fb0d90b5b8d25d378d7043919becab01e (patch) | |
tree | 3ab94aad4e2edc8ecfaeecbb098922375318a39f /sys/arch/hp300 | |
parent | 32d374af3a6d3edf3bcc269559ecb942cb36befb (diff) |
Add DIOCRLDINFO to those drivers previously deprived.
Noticed by & ok deraadt@
Diffstat (limited to 'sys/arch/hp300')
-rw-r--r-- | sys/arch/hp300/dev/hd.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/hp300/dev/hd.c b/sys/arch/hp300/dev/hd.c index 378270a69b9..3c0ee2dd9c8 100644 --- a/sys/arch/hp300/dev/hd.c +++ b/sys/arch/hp300/dev/hd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hd.c,v 1.55 2009/01/25 14:29:29 miod Exp $ */ +/* $OpenBSD: hd.c,v 1.56 2009/06/04 05:57:27 krw Exp $ */ /* $NetBSD: rd.c,v 1.33 1997/07/10 18:14:08 kleink Exp $ */ /* @@ -1137,6 +1137,7 @@ hdioctl(dev, cmd, data, flag, p) struct proc *p; { int unit = DISKUNIT(dev); + struct disklabel *lp; struct hd_softc *sc; int error = 0; @@ -1145,6 +1146,13 @@ hdioctl(dev, cmd, data, flag, p) return (ENXIO); switch (cmd) { + case DIOCRLDINFO: + lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK); + hdgetdisklabel(dev, sc, lp, 0); + *(sc->sc_dkdev.dk_label) = *lp; + free(lp, M_TEMP); + return 0; + case DIOCGPDINFO: hdgetdisklabel(dev, sc, (struct disklabel *)data, 1); goto exit; |