Changeset 421


Ignore:
Timestamp:
May 2, 2009, 11:30:13 PM (12 years ago)
Author:
khorben
Message:

Merge from upstream

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/System/Sources/libc/include/kernel/netbsd/sys/ioctl.h

    r284 r421  
    1 /* $Id: ioctl.h,v 1.2 2007/06/13 23:15:48 khorben Exp $ */
    2 /* Copyright (c) 2007 Pierre Pronchery <khorben@defora.org> */
     1/* $Id: ioctl.h,v 1.3 2009/05/02 21:24:32 khorben Exp $ */
     2/* Copyright (c) 2009 Pierre Pronchery <khorben@defora.org> */
    33/* This file is part of DeforaOS System libc */
    44/* libc is not free software; you can redistribute it and/or modify it under
     
    2323/* macros */
    2424# define _IOC(inout, group, num, len) \
    25         (inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num))
    26 # define _IOR(g, n, t) _IOC(IOC_OUT, (g), (n), sizeof(t))
     25                (inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num))
     26# define _IO(g, n)      _IOC(IOC_VOID, (g), (n), 0)
     27# define _IOR(g, n, t)  _IOC(IOC_OUT, (g), (n), sizeof(t))
     28# define _IOW(g, n, t)  _IOC(IOC_IN, (g), (n), sizeof(t))
     29# define _IORW(g, n, t) _IOC(IOC_INOUT, (g), (n), sizeof(t))
    2730
    2831
    2932/* constants */
    3033# define IOCPARM_MASK   0x1fff
     34# define IOC_VOID       (unsigned long)0x20000000
    3135# define IOC_OUT        (unsigned long)0x40000000
     36# define IOC_IN         (unsigned long)0x80000000
    3237# define IOC_DIRMASK    (unsigned long)0xe0000000
    3338
    34 # define TIOCGETA _IOR('t', 19, struct termios)
     39# define TIOCGETA       _IOR('t', 19, struct termios)
    3540
    3641#endif /* !LIBC_KERNEL_NETBSD_SYS_IOCTL_H */
Note: See TracChangeset for help on using the changeset viewer.