blob: 5fbc344c0e9f7e66433f3e17b1ba4b28d4a56307 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#include <stdio.h>
2#include <stdlib.h>
3#include <termios.h>
4#include <unistd.h>
5#include <asm/ioctls.h>
6#include <sys/ioctl.h>
7
8int main(int argc,char *argv[])
9{
10 struct termios t;
11 int ret;
12
13 printf("TCGETS = 0x%08x\n",TCGETS);
14 printf("sizeof(struct termios) = %ld\n",(long)sizeof(struct termios));
15
16 ret = ioctl(fileno(stdout),TCGETS,&t);
17
18 if(ret<0){
19 perror("ioctl");
20 }else{
21 printf("ioctl returned %d\n",ret);
22 }
23
24 return 0;
25}