Subject: Re: IOCTL implementation and kernel/userland addresses
To: Chuck Silvers <chuq@chuq.com>
From: Reinoud Zandijk <reinoud@netbsd.org>
List: tech-kern
Date: 02/16/2005 23:25:39
--C7zPtVaVf+AK4Oqc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Mon, Feb 14, 2005 at 10:43:49AM -0800, Bill Studenmund wrote:
> > > Maybe "FKADDR".
> >
> > in solaris it's called FKIOCTL, how about we use that?
What about this following patch:
> cvs -q diff -u sys/fcntl.h
Index: sys/fcntl.h
===================================================================
RCS file: /cvsroot/src/sys/sys/fcntl.h,v
retrieving revision 1.29
diff -u -r1.29 fcntl.h
--- sys/fcntl.h 3 Feb 2005 19:20:01 -0000 1.29
+++ sys/fcntl.h 16 Feb 2005 22:21:31 -0000
@@ -124,11 +124,12 @@
#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)
+ FRSYNC|FALTIO|FKIOCTL)
/* bits settable by fcntl(F_SETFL, ...) */
-#define FCNTLFLAGS
(FAPPEND|FASYNC|FFSYNC|FNONBLOCK|FDSYNC|FRSYNC|FALTIO)
+#define FCNTLFLAGS
(FAPPEND|FASYNC|FFSYNC|FNONBLOCK|FDSYNC|FRSYNC|FALTIO|FKIOCTL)
#endif /* _KERNEL */
/*
--C7zPtVaVf+AK4Oqc
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)
iQEVAwUBQhPIXIKcNwBDyKpoAQJ7uggAxmjSH+i1gA1QOZsVMsDz0oJCBcL/2YQr
CzZXAA/U1hfJV+pNgkJboUNIBm8i56LPAnOwzIyHmzkDolug04jRn71+uN32D+VZ
HPYhfgOX9vAbKvfyaBOfHoMjBSsNs6URB2HdlFMroTlh/lbp8ivqzMnX3h13TV4S
DzawP4XR6wXOdCOUAn44b5UMbMx+HtOcClPo/76aefdDCQGG4FPKbLejaCKgHlsW
FAgWEWTKVPFqz9NN8MmX/A/tST7TKjznantUNiV0cv2bo6Oa64N2QhHlgl1JRJP3
/zH4yJOwe+DF2VbLZO9iP4urYjpgWnt2QAHxIYZ24NmsxU0g1CNSwA==
=aWK8
-----END PGP SIGNATURE-----
--C7zPtVaVf+AK4Oqc--