diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2008-07-20 01:53:44 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2008-07-20 01:53:44 +0000 |
commit | a3297c775348f26e4d371a04924ee16c408f89f4 (patch) | |
tree | 3bc2f6cf9d34831b3b2ad9dce74cf889254e2dd6 /sys/dev/vnd.c | |
parent | af33961a46a5c7c849ba8d378af25dfaa12ea191 (diff) |
Add DIOCGPDINFO support. 'disklabel -d svnd0' now works.
Diffstat (limited to 'sys/dev/vnd.c')
-rw-r--r-- | sys/dev/vnd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 8d3d79cfadc..85be177912d 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.86 2008/06/29 20:05:22 krw Exp $ */ +/* $OpenBSD: vnd.c,v 1.87 2008/07/20 01:53:43 krw Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -923,6 +923,12 @@ vndioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) break; + case DIOCGPDINFO: + if ((vnd->sc_flags & VNF_HAVELABEL) == 0) + return (ENOTTY); + vndgetdisklabel(dev, vnd, (struct disklabel *)addr, 1); + return (0); + case DIOCGDINFO: if ((vnd->sc_flags & VNF_HAVELABEL) == 0) return (ENOTTY); |