Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev move FWRITE checks to a common place
details: https://anonhg.NetBSD.org/src/rev/5fa9d5c6bb1e
branches: trunk
changeset: 339900:5fa9d5c6bb1e
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sun Aug 16 17:26:16 2015 +0000
description:
move FWRITE checks to a common place
diffstat:
sys/dev/dksubr.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diffs (49 lines):
diff -r 28e163ba5c12 -r 5fa9d5c6bb1e sys/dev/dksubr.c
--- a/sys/dev/dksubr.c Sun Aug 16 17:22:00 2015 +0000
+++ b/sys/dev/dksubr.c Sun Aug 16 17:26:16 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dksubr.c,v 1.68 2015/08/02 07:25:40 mlelstv Exp $ */
+/* $NetBSD: dksubr.c,v 1.69 2015/08/16 17:26:16 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.68 2015/08/02 07:25:40 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.69 2015/08/16 17:26:16 mlelstv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -357,9 +357,10 @@
case ODIOCSDINFO:
case ODIOCWDINFO:
#endif
+ case DIOCKLABEL:
case DIOCWLABEL:
case DIOCAWEDGE:
- case DIOCDWEDGE:
+ case DIOCSSTRATEGY:
if ((flag & FWRITE) == 0)
return EBADF;
}
@@ -431,8 +432,6 @@
break;
case DIOCKLABEL:
- if ((flag & FWRITE) == 0)
- return (EBADF);
if (*(int *)data != 0)
dksc->sc_flags |= DKF_KLABEL;
else
@@ -480,9 +479,6 @@
struct bufq_state *old;
int s;
- if ((flag & FWRITE) == 0) {
- return EBADF;
- }
if (dks->dks_param != NULL) {
return EINVAL;
}
Home |
Main Index |
Thread Index |
Old Index