diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-09-22 06:40:26 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-09-22 06:40:26 +0000 |
commit | 83018e34c552b5700c5ac28bf696aaa3a17bd340 (patch) | |
tree | ee30239a31556afdfeeb9b96973a4e7477ac1abf /sys/dev | |
parent | e691fb7bf4efc5936e953f3fbb2989323614af79 (diff) |
Add DIOCGPDINFO to drivers that were lacking it. Where there
is no easily available physical information outside of the stored
disklabel just make it a synonym for DIOCGDINFO.
Commit on the theory it is unlikely to harm, and fallout can be
addressed in the mass re-compile that will follow j2k10.
Should allow auto-allocation of disks to work with all devices.
ok deraadt@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/flash.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/flash.c b/sys/dev/flash.c index 8f267d5775f..9c18b848321 100644 --- a/sys/dev/flash.c +++ b/sys/dev/flash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: flash.c,v 1.18 2010/09/22 01:18:57 matthew Exp $ */ +/* $OpenBSD: flash.c,v 1.19 2010/09/22 06:40:25 krw Exp $ */ /* * Copyright (c) 2005 Uwe Stuehler <uwe@openbsd.org> @@ -850,9 +850,14 @@ flashioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p) } switch (cmd) { + case DIOCGPDINFO: + flashgetdisklabel(dev, sc, (struct disklabel *)data, 1); + break + case DIOCGDINFO: *(struct disklabel *)data = *sc->sc_dk.dk_label; break; + default: error = ENOTTY; break; |