Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys Pull up following revision(s) (requested by martin in...
details: https://anonhg.NetBSD.org/src/rev/93c26cacf3f3
branches: netbsd-8
changeset: 852324:93c26cacf3f3
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Fri Apr 05 08:40:19 2019 +0000
description:
Pull up following revision(s) (requested by martin in ticket #1223):
sys/sys/dkio.h: revision 1.25
sys/kern/subr_disk.c: revision 1.123
sys/dev/dksubr.c: revision 1.107
sys/dev/ccd.c: revision 1.179
sys/dev/ofw/ofdisk.c: revision 1.53
Add a disk ioctl DIOCRMWEDGES to remove all wedges of a given disk
(if not busy).
diffstat:
sys/dev/ccd.c | 5 +++--
sys/dev/dksubr.c | 5 +++--
sys/dev/ofw/ofdisk.c | 5 +++--
sys/kern/subr_disk.c | 11 +++++++++--
sys/sys/dkio.h | 5 ++++-
5 files changed, 22 insertions(+), 9 deletions(-)
diffs (127 lines):
diff -r e76974102717 -r 93c26cacf3f3 sys/dev/ccd.c
--- a/sys/dev/ccd.c Fri Apr 05 07:51:01 2019 +0000
+++ b/sys/dev/ccd.c Fri Apr 05 08:40:19 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ccd.c,v 1.172 2017/06/01 02:45:08 chs Exp $ */
+/* $NetBSD: ccd.c,v 1.172.2.1 2019/04/05 08:40:19 msaitoh Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc.
@@ -88,7 +88,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.172 2017/06/01 02:45:08 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.172.2.1 2019/04/05 08:40:19 msaitoh Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -1160,6 +1160,7 @@
case DIOCCACHESYNC:
case DIOCAWEDGE:
case DIOCDWEDGE:
+ case DIOCRMWEDGES:
case DIOCMWEDGES:
#ifdef __HAVE_OLD_DISKLABEL
case ODIOCSDINFO:
diff -r e76974102717 -r 93c26cacf3f3 sys/dev/dksubr.c
--- a/sys/dev/dksubr.c Fri Apr 05 07:51:01 2019 +0000
+++ b/sys/dev/dksubr.c Fri Apr 05 08:40:19 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dksubr.c,v 1.97.2.2 2018/11/26 17:13:07 snj Exp $ */
+/* $NetBSD: dksubr.c,v 1.97.2.3 2019/04/05 08:40:19 msaitoh 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.97.2.2 2018/11/26 17:13:07 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.97.2.3 2019/04/05 08:40:19 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -616,6 +616,7 @@
case DIOCDWEDGE:
case DIOCLWEDGES:
case DIOCMWEDGES:
+ case DIOCRMWEDGES:
case DIOCCACHESYNC:
#ifdef __HAVE_OLD_DISKLABEL
case ODIOCGDINFO:
diff -r e76974102717 -r 93c26cacf3f3 sys/dev/ofw/ofdisk.c
--- a/sys/dev/ofw/ofdisk.c Fri Apr 05 07:51:01 2019 +0000
+++ b/sys/dev/ofw/ofdisk.c Fri Apr 05 08:40:19 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ofdisk.c,v 1.52 2017/03/25 09:21:21 martin Exp $ */
+/* $NetBSD: ofdisk.c,v 1.52.6.1 2019/04/05 08:40:19 msaitoh Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.52 2017/03/25 09:21:21 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.52.6.1 2019/04/05 08:40:19 msaitoh Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -367,6 +367,7 @@
case DIOCDWEDGE:
case DIOCAWEDGE:
case DIOCLWEDGES:
+ case DIOCRMWEDGES:
case DIOCMWEDGES:
if (OFDISK_FLOPPY_P(of))
return ENOTTY;
diff -r e76974102717 -r 93c26cacf3f3 sys/kern/subr_disk.c
--- a/sys/kern/subr_disk.c Fri Apr 05 07:51:01 2019 +0000
+++ b/sys/kern/subr_disk.c Fri Apr 05 08:40:19 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_disk.c,v 1.119 2017/06/01 02:45:13 chs Exp $ */
+/* $NetBSD: subr_disk.c,v 1.119.2.1 2019/04/05 08:40:19 msaitoh Exp $ */
/*-
* Copyright (c) 1996, 1997, 1999, 2000, 2009 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.119 2017/06/01 02:45:13 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.119.2.1 2019/04/05 08:40:19 msaitoh Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -645,6 +645,13 @@
dkwedge_discover(dk);
return 0;
+ case DIOCRMWEDGES:
+ if ((flag & FWRITE) == 0)
+ return EBADF;
+
+ dkwedge_delall(dk);
+ return 0;
+
default:
return EPASSTHROUGH;
}
diff -r e76974102717 -r 93c26cacf3f3 sys/sys/dkio.h
--- a/sys/sys/dkio.h Fri Apr 05 07:51:01 2019 +0000
+++ b/sys/sys/dkio.h Fri Apr 05 08:40:19 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dkio.h,v 1.24 2017/04/05 20:15:49 jdolecek Exp $ */
+/* $NetBSD: dkio.h,v 1.24.6.1 2019/04/05 08:40:19 msaitoh Exp $ */
/*
* Copyright (c) 1987, 1988, 1993
@@ -130,4 +130,7 @@
#define DIOCGSECTORSIZE _IOR('d', 133, u_int) /* sector size in bytes */
#define DIOCGMEDIASIZE _IOR('d', 132, off_t) /* media size in bytes */
+ /* mass removal */
+#define DIOCRMWEDGES _IOR('d', 134, int) /* remove all wedges */
+
#endif /* _SYS_DKIO_H_ */
Home |
Main Index |
Thread Index |
Old Index