404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.140.188.79: ~ $
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _SPARC_IOCTL_H
#define _SPARC_IOCTL_H

/*
 * Our DIR and SIZE overlap in order to simulteneously provide
 * a non-zero _IOC_NONE (for binary compatibility) and
 * 14 bits of size as on i386. Here's the layout:
 *
 *   0xE0000000   DIR
 *   0x80000000     DIR = WRITE
 *   0x40000000     DIR = READ
 *   0x20000000     DIR = NONE
 *   0x3FFF0000   SIZE (overlaps NONE bit)
 *   0x0000FF00   TYPE
 *   0x000000FF   NR (CMD)
 */

#define _IOC_NRBITS      8
#define _IOC_TYPEBITS    8
#define _IOC_SIZEBITS   13	/* Actually 14, see below. */
#define _IOC_DIRBITS     3

#define _IOC_NRMASK      ((1 << _IOC_NRBITS)-1)
#define _IOC_TYPEMASK    ((1 << _IOC_TYPEBITS)-1)
#define _IOC_SIZEMASK    ((1 << _IOC_SIZEBITS)-1)
#define _IOC_XSIZEMASK   ((1 << (_IOC_SIZEBITS+1))-1)
#define _IOC_DIRMASK     ((1 << _IOC_DIRBITS)-1)

#define _IOC_NRSHIFT     0
#define _IOC_TYPESHIFT   (_IOC_NRSHIFT + _IOC_NRBITS)
#define _IOC_SIZESHIFT   (_IOC_TYPESHIFT + _IOC_TYPEBITS)
#define _IOC_DIRSHIFT    (_IOC_SIZESHIFT + _IOC_SIZEBITS)

#define _IOC_NONE        1U
#define _IOC_READ        2U
#define _IOC_WRITE       4U

#define _IOC(dir,type,nr,size) \
        (((dir)  << _IOC_DIRSHIFT) | \
         ((type) << _IOC_TYPESHIFT) | \
         ((nr)   << _IOC_NRSHIFT) | \
         ((size) << _IOC_SIZESHIFT))

#define _IO(type,nr)        _IOC(_IOC_NONE,(type),(nr),0)
#define _IOR(type,nr,size)  _IOC(_IOC_READ,(type),(nr),sizeof(size))
#define _IOW(type,nr,size)  _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))

/* Used to decode ioctl numbers in drivers despite the leading underscore... */
#define _IOC_DIR(nr)    \
 ( (((((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) & (_IOC_WRITE|_IOC_READ)) != 0)?   \
                            (((nr) >> _IOC_DIRSHIFT) & (_IOC_WRITE|_IOC_READ)):  \
                            (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) )
#define _IOC_TYPE(nr)       (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
#define _IOC_NR(nr)         (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
#define _IOC_SIZE(nr)   \
 ((((((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) & (_IOC_WRITE|_IOC_READ)) == 0)?    \
                         0: (((nr) >> _IOC_SIZESHIFT) & _IOC_XSIZEMASK))

/* ...and for the PCMCIA and sound. */
#define IOC_IN          (_IOC_WRITE << _IOC_DIRSHIFT)
#define IOC_OUT         (_IOC_READ << _IOC_DIRSHIFT)
#define IOC_INOUT       ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
#define IOCSIZE_MASK    (_IOC_XSIZEMASK << _IOC_SIZESHIFT)
#define IOCSIZE_SHIFT   (_IOC_SIZESHIFT)

#endif /* !(_SPARC_IOCTL_H) */

Filemanager

Name Type Size Permission Actions
Kbuild File 122 B 0644
apc.h File 1.7 KB 0644
asi.h File 14.73 KB 0644
auxvec.h File 153 B 0644
bitsperlong.h File 324 B 0644
byteorder.h File 191 B 0644
display7seg.h File 1.9 KB 0644
envctrl.h File 3.41 KB 0644
errno.h File 5.41 KB 0644
fbio.h File 7.72 KB 0644
fcntl.h File 1.75 KB 0644
ioctl.h File 2.58 KB 0644
ioctls.h File 5.87 KB 0644
ipcbuf.h File 776 B 0644
jsflash.h File 928 B 0644
kvm_para.h File 97 B 0644
mman.h File 1.22 KB 0644
msgbuf.h File 1.12 KB 0644
openpromio.h File 2.13 KB 0644
param.h File 253 B 0644
perfctr.h File 5.56 KB 0644
poll.h File 273 B 0644
posix_types.h File 1.48 KB 0644
psr.h File 2.21 KB 0644
psrcompat.h File 2.02 KB 0644
pstate.h File 5.81 KB 0644
ptrace.h File 8.03 KB 0644
resource.h File 770 B 0644
sembuf.h File 877 B 0644
setup.h File 310 B 0644
shmbuf.h File 1.3 KB 0644
sigcontext.h File 167 B 0644
siginfo.h File 670 B 0644
signal.h File 4.62 KB 0644
socket.h File 2.44 KB 0644
sockios.h File 435 B 0644
stat.h File 1.97 KB 0644
statfs.h File 164 B 0644
swab.h File 1.01 KB 0644
termbits.h File 6.92 KB 0644
termios.h File 742 B 0644
traps.h File 5.15 KB 0644
uctx.h File 1.39 KB 0644
unistd.h File 25.3 KB 0644
utrap.h File 1.5 KB 0644
watchdog.h File 1 KB 0644