Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Add the KERNEL-only flag FKIOCTL (like its named in ...



details:   https://anonhg.NetBSD.org/src/rev/e2ca0b47c2ac
branches:  trunk
changeset: 573950:e2ca0b47c2ac
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Wed Feb 16 23:34:05 2005 +0000

description:
Add the KERNEL-only flag FKIOCTL (like its named in Solaris) to be passed
as extra flag to VOP_IOCTL() calls to indicate that addresses/data blocks
specified in the ioctl paramter like an address to a datablock to be filled
is for kernel use and not for userland.

The few ioctl calls that have this kind of variable-length parameter
passing can then decide if they ought to use copyout() or to use memcpy()
depending on this FKIOCTL flag.

Name and patch discussed on tech-kern.

diffstat:

 sys/sys/fcntl.h |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 9d23cc5510a4 -r e2ca0b47c2ac sys/sys/fcntl.h
--- a/sys/sys/fcntl.h   Wed Feb 16 22:13:31 2005 +0000
+++ b/sys/sys/fcntl.h   Wed Feb 16 23:34:05 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fcntl.h,v 1.29 2005/02/03 19:20:01 perry Exp $ */
+/*     $NetBSD: fcntl.h,v 1.30 2005/02/16 23:34:05 reinoud Exp $       */
 
 /*-
  * Copyright (c) 1983, 1990, 1993
@@ -124,6 +124,7 @@
 #define        FMARK           0x00001000      /* mark during gc() */
 #define        FDEFER          0x00002000      /* defer for next gc pass */
 #define        FHASLOCK        0x00004000      /* descriptor holds advisory lock */
+#define FKIOCTL                0x80000000
 /* bits to save after open(2) */
 #define        FMASK           (FREAD|FWRITE|FAPPEND|FASYNC|FFSYNC|FNONBLOCK|FDSYNC|\
                         FRSYNC|FALTIO)



Home | Main Index | Thread Index | Old Index