Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys support DIOCMWEDGES ioctl
details: https://anonhg.NetBSD.org/src/rev/45fd4f339796
branches: trunk
changeset: 333567:45fd4f339796
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sun Nov 09 10:10:08 2014 +0000
description:
support DIOCMWEDGES ioctl
diffstat:
sys/arch/emips/ebus/ace_ebus.c | 13 +++++++++++--
sys/arch/emips/ebus/flash_ebus.c | 13 +++++++++++--
sys/dev/mca/ed_mca.c | 13 +++++++++++--
sys/dev/mscp/mscp_disk.c | 13 +++++++++++--
sys/dev/ofw/ofdisk.c | 16 ++++++++++++++--
sys/dev/qbus/rl.c | 12 ++++++++++--
6 files changed, 68 insertions(+), 12 deletions(-)
diffs (206 lines):
diff -r 42e90dcea262 -r 45fd4f339796 sys/arch/emips/ebus/ace_ebus.c
--- a/sys/arch/emips/ebus/ace_ebus.c Sun Nov 09 09:21:57 2014 +0000
+++ b/sys/arch/emips/ebus/ace_ebus.c Sun Nov 09 10:10:08 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ace_ebus.c,v 1.13 2014/08/10 16:44:33 tls Exp $ */
+/* $NetBSD: ace_ebus.c,v 1.14 2014/11/09 10:10:08 mlelstv Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ace_ebus.c,v 1.13 2014/08/10 16:44:33 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ace_ebus.c,v 1.14 2014/11/09 10:10:08 mlelstv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2278,6 +2278,15 @@
return dkwedge_list(&ace->sc_dk, dkwl, l);
}
+ case DIOCMWEDGES:
+ {
+ if ((flag & FWRITE) == 0)
+ return EBADF;
+
+ dkwedge_discover(&ace->sc_dk);
+ return 0;
+ }
+
case DIOCGSTRATEGY:
{
struct disk_strategy *dks = (void *)addr;
diff -r 42e90dcea262 -r 45fd4f339796 sys/arch/emips/ebus/flash_ebus.c
--- a/sys/arch/emips/ebus/flash_ebus.c Sun Nov 09 09:21:57 2014 +0000
+++ b/sys/arch/emips/ebus/flash_ebus.c Sun Nov 09 10:10:08 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: flash_ebus.c,v 1.11 2014/08/10 16:44:33 tls Exp $ */
+/* $NetBSD: flash_ebus.c,v 1.12 2014/11/09 10:10:08 mlelstv Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: flash_ebus.c,v 1.11 2014/08/10 16:44:33 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: flash_ebus.c,v 1.12 2014/11/09 10:10:08 mlelstv Exp $");
/* Driver for the Intel 28F320/640/128 (J3A150) StrataFlash memory device
* Extended to include the Intel JS28F256P30T95.
@@ -2195,6 +2195,15 @@
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 42e90dcea262 -r 45fd4f339796 sys/dev/mca/ed_mca.c
--- a/sys/dev/mca/ed_mca.c Sun Nov 09 09:21:57 2014 +0000
+++ b/sys/dev/mca/ed_mca.c Sun Nov 09 10:10:08 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ed_mca.c,v 1.58 2014/08/10 16:44:35 tls Exp $ */
+/* $NetBSD: ed_mca.c,v 1.59 2014/11/09 10:10:08 mlelstv Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1.58 2014/08/10 16:44:35 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1.59 2014/11/09 10:10:08 mlelstv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -602,6 +602,15 @@
return (dkwedge_list(&ed->sc_dk, dkwl, l));
}
+ case DIOCMWEDGES:
+ {
+ if ((flag & FWRITE) == 0)
+ return (EBADF);
+
+ dkwedge_discover(&ed->sc_dk);
+ return 0;
+ }
+
default:
return ENOTTY;
}
diff -r 42e90dcea262 -r 45fd4f339796 sys/dev/mscp/mscp_disk.c
--- a/sys/dev/mscp/mscp_disk.c Sun Nov 09 09:21:57 2014 +0000
+++ b/sys/dev/mscp/mscp_disk.c Sun Nov 09 10:10:08 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mscp_disk.c,v 1.81 2014/07/25 08:10:37 dholland Exp $ */
+/* $NetBSD: mscp_disk.c,v 1.82 2014/11/09 10:10:08 mlelstv Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
* All rights reserved.
@@ -82,7 +82,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.81 2014/07/25 08:10:37 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.82 2014/11/09 10:10:08 mlelstv Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -530,6 +530,15 @@
return (dkwedge_list(&ra->ra_disk, dkwl, l));
}
+ case DIOCMWEDGES:
+ {
+ if ((flag & FWRITE) == 0)
+ return (EBADF);
+
+ dkwedge_discover(&ra->ra_disk);
+ return 0;
+ }
+
default:
error = ENOTTY;
break;
diff -r 42e90dcea262 -r 45fd4f339796 sys/dev/ofw/ofdisk.c
--- a/sys/dev/ofw/ofdisk.c Sun Nov 09 09:21:57 2014 +0000
+++ b/sys/dev/ofw/ofdisk.c Sun Nov 09 10:10:08 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ofdisk.c,v 1.47 2014/07/25 08:10:37 dholland Exp $ */
+/* $NetBSD: ofdisk.c,v 1.48 2014/11/09 10:10:08 mlelstv Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.47 2014/07/25 08:10:37 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.48 2014/11/09 10:10:08 mlelstv Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -473,6 +473,18 @@
return (dkwedge_list(&of->sc_dk, dkwl, l));
}
+ case DIOCMWEDGES:
+ {
+ if (OFDISK_FLOPPY_P(of))
+ return (ENOTTY);
+
+ if ((flag & FWRITE) == 0)
+ return (EBADF);
+
+ dkwedge_discover(&of->sc_dk);
+ return 0;
+ }
+
default:
return ENOTTY;
}
diff -r 42e90dcea262 -r 45fd4f339796 sys/dev/qbus/rl.c
--- a/sys/dev/qbus/rl.c Sun Nov 09 09:21:57 2014 +0000
+++ b/sys/dev/qbus/rl.c Sun Nov 09 10:10:08 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rl.c,v 1.45 2014/07/25 08:10:38 dholland Exp $ */
+/* $NetBSD: rl.c,v 1.46 2014/11/09 10:10:08 mlelstv Exp $ */
/*
* Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rl.c,v 1.45 2014/07/25 08:10:38 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rl.c,v 1.46 2014/11/09 10:10:08 mlelstv Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -535,6 +535,14 @@
return dkwedge_list(&rc->rc_disk, dkwl, l);
}
+ case DIOCMWEDGES: {
+ if ((flag & FWRITE) == 0)
+ return (EBADF);
+
+ dkwedge_discover(&rc->rc_disk);
+ return 0;
+ }
+
default:
err = ENOTTY;
break;
Home |
Main Index |
Thread Index |
Old Index