Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev don't allow STRATEGY if we are not inited.
details: https://anonhg.NetBSD.org/src/rev/73d1a7374473
branches: trunk
changeset: 340065:73d1a7374473
user: christos <christos%NetBSD.org@localhost>
date: Fri Aug 21 09:33:53 2015 +0000
description:
don't allow STRATEGY if we are not inited.
diffstat:
sys/dev/cgd.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r 2d12e6206d7c -r 73d1a7374473 sys/dev/cgd.c
--- a/sys/dev/cgd.c Fri Aug 21 09:18:17 2015 +0000
+++ b/sys/dev/cgd.c Fri Aug 21 09:33:53 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd.c,v 1.102 2015/08/20 14:40:17 christos Exp $ */
+/* $NetBSD: cgd.c,v 1.103 2015/08/21 09:33:53 christos Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.102 2015/08/20 14:40:17 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.103 2015/08/21 09:33:53 christos Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -563,6 +563,11 @@
* We pass this call down to the underlying disk.
*/
return VOP_IOCTL(cs->sc_tvn, cmd, data, flag, l->l_cred);
+ case DIOCGSTRATEGY:
+ case DIOCSSTRATEGY:
+ if ((dksc->sc_flags & DKF_INITED) == 0)
+ return ENOENT;
+ /*FALLTHROUGH*/
default:
return dk_ioctl(dksc, dev, cmd, data, flag, l);
case CGDIOCGET:
Home |
Main Index |
Thread Index |
Old Index