Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev support DIOCMWEDGES ioctl.
details: https://anonhg.NetBSD.org/src/rev/0260f3cb702d
branches: trunk
changeset: 333437:0260f3cb702d
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Tue Nov 04 07:51:54 2014 +0000
description:
support DIOCMWEDGES ioctl.
diffstat:
sys/dev/ata/wd.c | 13 +++++++++++--
sys/dev/dksubr.c | 14 ++++++++++++--
sys/dev/ld.c | 14 ++++++++++++--
sys/dev/raidframe/rf_netbsdkintf.c | 9 +++++++--
sys/dev/scsipi/sd.c | 13 +++++++++++--
sys/dev/vnd.c | 11 +++++++++--
6 files changed, 62 insertions(+), 12 deletions(-)
diffs (221 lines):
diff -r f97315f864c5 -r 0260f3cb702d sys/dev/ata/wd.c
--- a/sys/dev/ata/wd.c Tue Nov 04 07:50:39 2014 +0000
+++ b/sys/dev/ata/wd.c Tue Nov 04 07:51:54 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wd.c,v 1.414 2014/10/11 14:05:11 mlelstv Exp $ */
+/* $NetBSD: wd.c,v 1.415 2014/11/04 07:51:55 mlelstv Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.414 2014/10/11 14:05:11 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.415 2014/11/04 07:51:55 mlelstv Exp $");
#include "opt_ata.h"
@@ -1510,6 +1510,15 @@
return (dkwedge_list(&wd->sc_dk, dkwl, l));
}
+ case DIOCMWEDGES:
+ {
+ if ((flag & FWRITE) == 0)
+ return (EBADF);
+
+ dkwedge_discover(&wd->sc_dk);
+ return 0;
+ }
+
case DIOCGSTRATEGY:
{
struct disk_strategy *dks = (void *)addr;
diff -r f97315f864c5 -r 0260f3cb702d sys/dev/dksubr.c
--- a/sys/dev/dksubr.c Tue Nov 04 07:50:39 2014 +0000
+++ b/sys/dev/dksubr.c Tue Nov 04 07:51:54 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dksubr.c,v 1.53 2014/10/11 12:36:25 mlelstv Exp $ */
+/* $NetBSD: dksubr.c,v 1.54 2014/11/04 07:51:54 mlelstv Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 1999, 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.53 2014/10/11 12:36:25 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.54 2014/11/04 07:51:54 mlelstv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -304,6 +304,7 @@
case DIOCAWEDGE:
case DIOCDWEDGE:
case DIOCLWEDGES:
+ case DIOCMWEDGES:
case DIOCCACHESYNC:
#ifdef __HAVE_OLD_DISKLABEL
case ODIOCGDINFO:
@@ -433,6 +434,15 @@
return (dkwedge_list(&dksc->sc_dkdev, dkwl, l));
}
+ case DIOCMWEDGES:
+ {
+ if ((flag & FWRITE) == 0)
+ return (EBADF);
+
+ dkwedge_discover(&dksc->sc_dkdev);
+ return 0;
+ }
+
case DIOCGSTRATEGY:
{
struct disk_strategy *dks = (void *)data;
diff -r f97315f864c5 -r 0260f3cb702d sys/dev/ld.c
--- a/sys/dev/ld.c Tue Nov 04 07:50:39 2014 +0000
+++ b/sys/dev/ld.c Tue Nov 04 07:51:54 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ld.c,v 1.77 2014/10/11 12:01:27 mlelstv Exp $ */
+/* $NetBSD: ld.c,v 1.78 2014/11/04 07:51:54 mlelstv Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.77 2014/10/11 12:01:27 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.78 2014/11/04 07:51:54 mlelstv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -555,6 +555,16 @@
return (dkwedge_list(&sc->sc_dk, dkwl, l));
}
+
+ case DIOCMWEDGES:
+ {
+ if ((flag & FWRITE) == 0)
+ return (EBADF);
+
+ dkwedge_discover(&sc->sc_dk);
+ return 0;
+ }
+
case DIOCGSTRATEGY:
{
struct disk_strategy *dks = (void *)addr;
diff -r f97315f864c5 -r 0260f3cb702d sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c Tue Nov 04 07:50:39 2014 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c Tue Nov 04 07:51:54 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.314 2014/10/11 12:36:25 mlelstv Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.315 2014/11/04 07:51:55 mlelstv Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
***********************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.314 2014/10/11 12:36:25 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.315 2014/11/04 07:51:55 mlelstv Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -1090,6 +1090,7 @@
case DIOCWLABEL:
case DIOCAWEDGE:
case DIOCDWEDGE:
+ case DIOCMWEDGES:
case DIOCSSTRATEGY:
if ((flag & FWRITE) == 0)
return (EBADF);
@@ -1112,6 +1113,7 @@
case DIOCAWEDGE:
case DIOCDWEDGE:
case DIOCLWEDGES:
+ case DIOCMWEDGES:
case DIOCCACHESYNC:
case RAIDFRAME_SHUTDOWN:
case RAIDFRAME_REWRITEPARITY:
@@ -1917,6 +1919,9 @@
case DIOCLWEDGES:
return dkwedge_list(&rs->sc_dkdev,
(struct dkwedge_list *)data, l);
+ case DIOCMWEDGES:
+ dkwedge_discover(&rs->sc_dkdev);
+ return 0;
case DIOCCACHESYNC:
return rf_sync_component_caches(raidPtr);
diff -r f97315f864c5 -r 0260f3cb702d sys/dev/scsipi/sd.c
--- a/sys/dev/scsipi/sd.c Tue Nov 04 07:50:39 2014 +0000
+++ b/sys/dev/scsipi/sd.c Tue Nov 04 07:51:54 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sd.c,v 1.309 2014/09/05 05:30:42 matt Exp $ */
+/* $NetBSD: sd.c,v 1.310 2014/11/04 07:51:55 mlelstv Exp $ */
/*-
* Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.309 2014/09/05 05:30:42 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.310 2014/11/04 07:51:55 mlelstv Exp $");
#include "opt_scsi.h"
@@ -1256,6 +1256,15 @@
return (dkwedge_list(&sd->sc_dk, dkwl, l));
}
+ case DIOCMWEDGES:
+ {
+ if ((flag & FWRITE) == 0)
+ return (EBADF);
+
+ dkwedge_discover(&sd->sc_dk);
+ return 0;
+ }
+
case DIOCGSTRATEGY:
{
struct disk_strategy *dks = addr;
diff -r f97315f864c5 -r 0260f3cb702d sys/dev/vnd.c
--- a/sys/dev/vnd.c Tue Nov 04 07:50:39 2014 +0000
+++ b/sys/dev/vnd.c Tue Nov 04 07:51:54 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vnd.c,v 1.233 2014/10/11 12:01:27 mlelstv Exp $ */
+/* $NetBSD: vnd.c,v 1.234 2014/11/04 07:51:54 mlelstv Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.233 2014/10/11 12:01:27 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.234 2014/11/04 07:51:54 mlelstv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_vnd.h"
@@ -1592,6 +1592,13 @@
return dkwedge_list(&vnd->sc_dkdev, dkwl, l);
+ case DIOCMWEDGES:
+ if ((flag & FWRITE) == 0)
+ return EBADF;
+
+ dkwedge_discover(&vnd->sc_dkdev);
+ return 0;
+
default:
return ENOTTY;
}
Home |
Main Index |
Thread Index |
Old Index