brintos

brintos / linux-shallow public Read only

0
0
Text · 3.9 KiB · cdc9f4c Raw
122 lines · c
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */2#ifndef __ASM_GENERIC_IOCTLS_H3#define __ASM_GENERIC_IOCTLS_H4 5#include <linux/ioctl.h>6 7/*8 * These are the most common definitions for tty ioctl numbers.9 * Most of them do not use the recommended _IOC(), but there is10 * probably some source code out there hardcoding the number,11 * so we might as well use them for all new platforms.12 *13 * The architectures that use different values here typically14 * try to be compatible with some Unix variants for the same15 * architecture.16 */17 18/* 0x54 is just a magic number to make these relatively unique ('T') */19 20#define TCGETS		0x540121#define TCSETS		0x540222#define TCSETSW		0x540323#define TCSETSF		0x540424#define TCGETA		0x540525#define TCSETA		0x540626#define TCSETAW		0x540727#define TCSETAF		0x540828#define TCSBRK		0x540929#define TCXONC		0x540A30#define TCFLSH		0x540B31#define TIOCEXCL	0x540C32#define TIOCNXCL	0x540D33#define TIOCSCTTY	0x540E34#define TIOCGPGRP	0x540F35#define TIOCSPGRP	0x541036#define TIOCOUTQ	0x541137#define TIOCSTI		0x541238#define TIOCGWINSZ	0x541339#define TIOCSWINSZ	0x541440#define TIOCMGET	0x541541#define TIOCMBIS	0x541642#define TIOCMBIC	0x541743#define TIOCMSET	0x541844#define TIOCGSOFTCAR	0x541945#define TIOCSSOFTCAR	0x541A46#define FIONREAD	0x541B47#define TIOCINQ		FIONREAD48#define TIOCLINUX	0x541C49#define TIOCCONS	0x541D50#define TIOCGSERIAL	0x541E51#define TIOCSSERIAL	0x541F52#define TIOCPKT		0x542053#define FIONBIO		0x542154#define TIOCNOTTY	0x542255#define TIOCSETD	0x542356#define TIOCGETD	0x542457#define TCSBRKP		0x5425	/* Needed for POSIX tcsendbreak() */58#define TIOCSBRK	0x5427  /* BSD compatibility */59#define TIOCCBRK	0x5428  /* BSD compatibility */60#define TIOCGSID	0x5429  /* Return the session ID of FD */61#define TCGETS2		_IOR('T', 0x2A, struct termios2)62#define TCSETS2		_IOW('T', 0x2B, struct termios2)63#define TCSETSW2	_IOW('T', 0x2C, struct termios2)64#define TCSETSF2	_IOW('T', 0x2D, struct termios2)65#define TIOCGRS485	0x542E66#ifndef TIOCSRS48567#define TIOCSRS485	0x542F68#endif69#define TIOCGPTN	_IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */70#define TIOCSPTLCK	_IOW('T', 0x31, int)  /* Lock/unlock Pty */71#define TIOCGDEV	_IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */72#define TCGETX		0x5432 /* SYS5 TCGETX compatibility */73#define TCSETX		0x543374#define TCSETXF		0x543475#define TCSETXW		0x543576#define TIOCSIG		_IOW('T', 0x36, int)  /* pty: generate signal */77#define TIOCVHANGUP	0x543778#define TIOCGPKT	_IOR('T', 0x38, int) /* Get packet mode state */79#define TIOCGPTLCK	_IOR('T', 0x39, int) /* Get Pty lock state */80#define TIOCGEXCL	_IOR('T', 0x40, int) /* Get exclusive mode state */81#define TIOCGPTPEER	_IO('T', 0x41) /* Safely open the slave */82#define TIOCGISO7816	_IOR('T', 0x42, struct serial_iso7816)83#define TIOCSISO7816	_IOWR('T', 0x43, struct serial_iso7816)84 85#define FIONCLEX	0x545086#define FIOCLEX		0x545187#define FIOASYNC	0x545288#define TIOCSERCONFIG	0x545389#define TIOCSERGWILD	0x545490#define TIOCSERSWILD	0x545591#define TIOCGLCKTRMIOS	0x545692#define TIOCSLCKTRMIOS	0x545793#define TIOCSERGSTRUCT	0x5458 /* For debugging only */94#define TIOCSERGETLSR   0x5459 /* Get line status register */95#define TIOCSERGETMULTI 0x545A /* Get multiport config  */96#define TIOCSERSETMULTI 0x545B /* Set multiport config */97 98#define TIOCMIWAIT	0x545C	/* wait for a change on serial input line(s) */99#define TIOCGICOUNT	0x545D	/* read serial port inline interrupt counts */100 101/*102 * Some arches already define FIOQSIZE due to a historical103 * conflict with a Hayes modem-specific ioctl value.104 */105#ifndef FIOQSIZE106# define FIOQSIZE	0x5460107#endif108 109/* Used for packet mode */110#define TIOCPKT_DATA		 0111#define TIOCPKT_FLUSHREAD	 1112#define TIOCPKT_FLUSHWRITE	 2113#define TIOCPKT_STOP		 4114#define TIOCPKT_START		 8115#define TIOCPKT_NOSTOP		16116#define TIOCPKT_DOSTOP		32117#define TIOCPKT_IOCTL		64118 119#define TIOCSER_TEMT	0x01	/* Transmitter physically empty */120 121#endif /* __ASM_GENERIC_IOCTLS_H */122