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