this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Implement TIOCSETC and TIOCGETC ioctls

+38
+36
src/kernel/emulation/linux/ioctl/termios.c
··· 129 129 130 130 return IOCTL_HANDLED; 131 131 } 132 + case BSD_TIOCGETC: 133 + { 134 + struct linux_termios in; 135 + struct tchars* out = (struct tchars*) arg; 136 + 137 + *retval = __real_ioctl(fd, LINUX_TCGETS, &in); 138 + 139 + out->t_intrc = in.c_cc[LINUX_VINTR]; 140 + out->t_quitc = in.c_cc[LINUX_VQUIT]; 141 + out->t_startc = in.c_cc[LINUX_VSTART]; 142 + out->t_stopc = in.c_cc[LINUX_VSTOP]; 143 + out->t_eofc = in.c_cc[LINUX_VEOF]; 144 + out->t_brkc = in.c_cc[LINUX_VEOL2]; 145 + 146 + return IOCTL_HANDLED; 147 + } 148 + case BSD_TIOCSETC: 149 + { 150 + struct linux_termios out; 151 + const struct tchars* in = (const struct tchars*) arg; 152 + 153 + // Get existing values so that we don't overwrite many 154 + // of the parameters not specified in struct tchars. 155 + __real_ioctl(fd, LINUX_TCGETS, &out); 156 + 157 + out.c_cc[LINUX_VINTR] = in->t_intrc; 158 + out.c_cc[LINUX_VQUIT] = in->t_quitc; 159 + out.c_cc[LINUX_VSTART] = in->t_startc; 160 + out.c_cc[LINUX_VSTOP] = in->t_stopc; 161 + out.c_cc[LINUX_VEOF] = in->t_eofc; 162 + out.c_cc[LINUX_VEOL2] = in->t_brkc; 163 + 164 + *retval = __real_ioctl(fd, LINUX_TCSETS, &out); 165 + 166 + return IOCTL_HANDLED; 167 + } 132 168 case BSD_TIOCGWINSZ: 133 169 { 134 170 *retval = __real_ioctl(fd, LINUX_TIOCGWINSZ, arg);
+2
src/kernel/emulation/linux/ioctl/termios.h
··· 87 87 #define BSD_TIOCISATTY 0x2000745E 88 88 #define BSD_TIOCGETP 0x40067408 89 89 #define BSD_TIOCSETP 0x80067409 90 + #define BSD_TIOCGETC 0x40067412 91 + #define BSD_TIOCSETC 0x80067411 90 92 91 93 #define BSD_TIOCSBRK BSD_IO('t', 123) 92 94 #define BSD_TIOCCBRK BSD_IO('t', 122)