Path: blob/master/tools/include/uapi/asm-generic/ioctls.h
26289 views
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1#ifndef __ASM_GENERIC_IOCTLS_H2#define __ASM_GENERIC_IOCTLS_H34#include <linux/ioctl.h>56/*7* These are the most common definitions for tty ioctl numbers.8* Most of them do not use the recommended _IOC(), but there is9* probably some source code out there hardcoding the number,10* so we might as well use them for all new platforms.11*12* The architectures that use different values here typically13* try to be compatible with some Unix variants for the same14* architecture.15*/1617/* 0x54 is just a magic number to make these relatively unique ('T') */1819#define TCGETS 0x540120#define TCSETS 0x540221#define TCSETSW 0x540322#define TCSETSF 0x540423#define TCGETA 0x540524#define TCSETA 0x540625#define TCSETAW 0x540726#define TCSETAF 0x540827#define TCSBRK 0x540928#define TCXONC 0x540A29#define TCFLSH 0x540B30#define TIOCEXCL 0x540C31#define TIOCNXCL 0x540D32#define TIOCSCTTY 0x540E33#define TIOCGPGRP 0x540F34#define TIOCSPGRP 0x541035#define TIOCOUTQ 0x541136#define TIOCSTI 0x541237#define TIOCGWINSZ 0x541338#define TIOCSWINSZ 0x541439#define TIOCMGET 0x541540#define TIOCMBIS 0x541641#define TIOCMBIC 0x541742#define TIOCMSET 0x541843#define TIOCGSOFTCAR 0x541944#define TIOCSSOFTCAR 0x541A45#define FIONREAD 0x541B46#define TIOCINQ FIONREAD47#define TIOCLINUX 0x541C48#define TIOCCONS 0x541D49#define TIOCGSERIAL 0x541E50#define TIOCSSERIAL 0x541F51#define TIOCPKT 0x542052#define FIONBIO 0x542153#define TIOCNOTTY 0x542254#define TIOCSETD 0x542355#define TIOCGETD 0x542456#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */57#define TIOCSBRK 0x5427 /* BSD compatibility */58#define TIOCCBRK 0x5428 /* BSD compatibility */59#define TIOCGSID 0x5429 /* Return the session ID of FD */60#define TCGETS2 _IOR('T', 0x2A, struct termios2)61#define TCSETS2 _IOW('T', 0x2B, struct termios2)62#define TCSETSW2 _IOW('T', 0x2C, struct termios2)63#define TCSETSF2 _IOW('T', 0x2D, struct termios2)64#define TIOCGRS485 0x542E65#ifndef TIOCSRS48566#define TIOCSRS485 0x542F67#endif68#define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */69#define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */70#define TIOCGDEV _IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */71#define TCGETX 0x5432 /* SYS5 TCGETX compatibility */72#define TCSETX 0x543373#define TCSETXF 0x543474#define TCSETXW 0x543575#define TIOCSIG _IOW('T', 0x36, int) /* pty: generate signal */76#define TIOCVHANGUP 0x543777#define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */78#define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */79#define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */80#define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */81#define TIOCGISO7816 _IOR('T', 0x42, struct serial_iso7816)82#define TIOCSISO7816 _IOWR('T', 0x43, struct serial_iso7816)8384#define FIONCLEX 0x545085#define FIOCLEX 0x545186#define FIOASYNC 0x545287#define TIOCSERCONFIG 0x545388#define TIOCSERGWILD 0x545489#define TIOCSERSWILD 0x545590#define TIOCGLCKTRMIOS 0x545691#define TIOCSLCKTRMIOS 0x545792#define TIOCSERGSTRUCT 0x5458 /* For debugging only */93#define TIOCSERGETLSR 0x5459 /* Get line status register */94#define TIOCSERGETMULTI 0x545A /* Get multiport config */95#define TIOCSERSETMULTI 0x545B /* Set multiport config */9697#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */98#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */99100/*101* Some arches already define FIOQSIZE due to a historical102* conflict with a Hayes modem-specific ioctl value.103*/104#ifndef FIOQSIZE105# define FIOQSIZE 0x5460106#endif107108/* Used for packet mode */109#define TIOCPKT_DATA 0110#define TIOCPKT_FLUSHREAD 1111#define TIOCPKT_FLUSHWRITE 2112#define TIOCPKT_STOP 4113#define TIOCPKT_START 8114#define TIOCPKT_NOSTOP 16115#define TIOCPKT_DOSTOP 32116#define TIOCPKT_IOCTL 64117118#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */119120#endif /* __ASM_GENERIC_IOCTLS_H */121122123