Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev use disk_ioctl to provide DIOCGDISKINFO.



details:   https://anonhg.NetBSD.org/src/rev/7f653b1ba25c
branches:  trunk
changeset: 805334:7f653b1ba25c
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Mon Dec 29 18:23:57 2014 +0000

description:
use disk_ioctl to provide DIOCGDISKINFO.

diffstat:

 sys/dev/cgd.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (37 lines):

diff -r 283fd83787dd -r 7f653b1ba25c sys/dev/cgd.c
--- a/sys/dev/cgd.c     Mon Dec 29 17:17:54 2014 +0000
+++ b/sys/dev/cgd.c     Mon Dec 29 18:23:57 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd.c,v 1.91 2014/10/02 21:01:38 justin Exp $ */
+/* $NetBSD: cgd.c,v 1.92 2014/12/29 18:23:57 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.91 2014/10/02 21:01:38 justin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.92 2014/12/29 18:23:57 mlelstv Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -548,6 +548,7 @@
        struct  dk_softc *dksc;
        int     part = DISKPART(dev);
        int     pmask = 1 << part;
+       int     error;
 
        DPRINTF_FOLLOW(("cgdioctl(0x%"PRIx64", %ld, %p, %d, %p)\n",
            dev, cmd, data, flag, l));
@@ -568,6 +569,10 @@
                break;
        }
 
+       error = disk_ioctl(&dksc->sc_dkdev, cmd, data, flag, l);
+       if (error != EPASSTHROUGH)
+               return (error);
+
        switch (cmd) {
        case CGDIOCSET:
                if (dksc->sc_flags & DKF_INITED)



Home | Main Index | Thread Index | Old Index