summaryrefslogtreecommitdiff
path: root/test/termios/termios.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/termios/termios.c')
-rw-r--r--test/termios/termios.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/termios/termios.c b/test/termios/termios.c
new file mode 100644
index 000000000..250d9eb14
--- /dev/null
+++ b/test/termios/termios.c
@@ -0,0 +1,24 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <termios.h>
+#include <unistd.h>
+#include <asm/ioctls.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;
+}