From 7206ca397dc170be666cd0f0405acb3013d2f488 Mon Sep 17 00:00:00 2001 From: krw Date: Sun, 20 Jul 2008 01:53:43 +0000 Subject: [PATCH] Add DIOCGPDINFO support. 'disklabel -d svnd0' now works. --- sys/dev/vnd.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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); -- 2.20.1