Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/compat/linux/arch/m68k Pull up revision 1.2 (reques...
details: https://anonhg.NetBSD.org/src/rev/ac0db42822f5
branches: netbsd-1-5
changeset: 490983:ac0db42822f5
user: he <he%NetBSD.org@localhost>
date: Fri Mar 30 21:35:55 2001 +0000
description:
Pull up revision 1.2 (requested by fvdl):
Add some required Linux emulation bits to support the Linux
version of VMware.
diffstat:
sys/compat/linux/arch/m68k/linux_ioctl.h | 56 +++++--------------------------
1 files changed, 9 insertions(+), 47 deletions(-)
diffs (72 lines):
diff -r 903b703d500b -r ac0db42822f5 sys/compat/linux/arch/m68k/linux_ioctl.h
--- a/sys/compat/linux/arch/m68k/linux_ioctl.h Fri Mar 30 21:35:26 2001 +0000
+++ b/sys/compat/linux/arch/m68k/linux_ioctl.h Fri Mar 30 21:35:55 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_ioctl.h,v 1.1 1998/12/15 19:25:40 itohy Exp $ */
+/* $NetBSD: linux_ioctl.h,v 1.1.18.1 2001/03/30 21:35:55 he Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,54 +38,16 @@
#ifndef _M68K_LINUX_IOCTL_H
#define _M68K_LINUX_IOCTL_H
-/* Note: Linux looks to have tried to switch to a structured way of defining
- * ioctls. Doesn't look like they finished. Some ioctls use these
- * defines. Other are still just a number. (But they could
- * probably be encoded as _LINUX_IO('T', #) )
- */
-#define _LINUX_IOC_NRBITS 8
-#define _LINUX_IOC_TYPEBITS 8
-#define _LINUX_IOC_SIZEBITS 14
-#define _LINUX_IOC_DIRBITS 2
-#define _LINUX_IOC_NRMASK ((1 << _LINUX_IOC_NRBITS) - 1)
-#define _LINUX_IOC_TYPEMASK ((1 << _LINUX_IOC_TYPEBITS) - 1)
-#define _LINUX_IOC_SIZEMAEK ((1 << _LINUX_IOC_SIZEBITS) - 1)
-#define _LINUX_IOC_DIRMASK ((1 << _LINUX_IOC_DIRBITS) - 1)
-
-#define _LINUX_IOC_NRSHIFT 0
-#define _LINUX_IOC_TYPESHIFT (_LINUX_IOC_NRSHIFT + _LINUX_IOC_NRBITS)
-#define _LINUX_IOC_SIZESHIFT (_LINUX_IOC_TYPESHIFT + _LINUX_IOC_TYPEBITS)
-#define _LINUX_IOC_DIRSHIFT (_LINUX_IOC_SIZESHIFT + _LINUX_IOC_SIZEBITS)
-
-#define _LINUX_IOC_NONE 0U
-#define _LINUX_IOC_READ 1U
-#define _LINUX_IOC_WRITE 2U
+#define _LINUX_IOC_NRBITS 8
+#define _LINUX_IOC_TYPEBITS 8
+#define _LINUX_IOC_SIZEBITS 14
+#define _LINUX_IOC_DIRBITS 2
-#define _LINUX_IOC(dir,type,nr,size) \
- (((nr) << _LINUX_IOC_NRSHIFT) | \
- ((type) << _LINUX_IOC_TYPESHIFT) | \
- ((size) << _LINUX_IOC_SIZESHIFT) | \
- ((dir) << _LINUX_IOC_DIRSHIFT))
+#define _LINUX_IOC_NRSHIFT 0
-#define _LINUX_IO(type,nr) \
- _LINUX_IOC(_LINUX_IOC_NONE,(type),(nr),0)
-#define _LINUX_IOR(type,nr,size) \
- _LINUX_IOC(_LINUX_IOC_READ,(type),(nr),sizeof(size))
-#define _LINUX_IOW(type,nr,size) \
- _LINUX_IOC(_LINUX_IOC_WRITE,(type),(nr),sizeof(size))
-#define _LINUX_IOWR(type,nr,size) \
- _LINUX_IOC(_LINUX_IOC_READ|_LINUX_IOC_WRITE,(type),(nr),sizeof(size))
-
-#define _LINUX_IOC_DIR(nr) \
- (((nr) >> _LINUX_IOC_DIRSHIFT) & _LINUX_IOC_DIRMASK)
-#define _LINUX_IOC_TYPE(nr) \
- (((nr) >> _LINUX_IOC_TYPESHIFT) & _LINUX_IOC_TYPEMASK)
-#define _LINUX_IOC_NR(nr) \
- (((nr) >> _LINUX_IOC_NRSHIFT) & _LINUX_IOC_NRMASK)
-#define _LINUX_IOC_SIZE(nr) \
- (((nr) >> _LINUX_IOC_SIZESHIFT) & _LINUX_IOC_SIZEMASK)
-
-#define LINUX_IOCGROUP(x) _LINUX_IOC_TYPE(x)
+#define _LINUX_IOC_NONE 0U
+#define _LINUX_IOC_WRITE 1U
+#define _LINUX_IOC_READ 2U
#endif /* !_M68K_LINUX_IOCTL_H */
Home |
Main Index |
Thread Index |
Old Index