summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libc/newlibif.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libc/newlibif.c')
-rw-r--r--c/src/lib/libc/newlibif.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/c/src/lib/libc/newlibif.c b/c/src/lib/libc/newlibif.c
index 5b59554428..aca1f369f7 100644
--- a/c/src/lib/libc/newlibif.c
+++ b/c/src/lib/libc/newlibif.c
@@ -87,4 +87,34 @@ fstat(int fd,
* getpid and kill are provided directly by rtems
*/
+/*
+ * ioctl -- IO control
+ */
+
+int
+ioctl(int fd, int request, void *argp)
+{
+ return __rtems_ioctl(fd,request,argp);
+}
+
+/*
+ * tcgetattr/tcsetattr -- get/set attributes of a device.
+ *
+ * by K.Shibuya
+ */
+
+int
+tcgetattr(int fd, struct termios *tp)
+{
+ return __rtems_ioctl(fd,RTEMS_IO_GET_ATTRIBUTES,tp);
+}
+
+int
+tcsetattr(int fd, int opt, struct termios *tp)
+{
+ if(opt != TCSANOW)
+ return -1;
+ return __rtems_ioctl(fd,RTEMS_IO_SET_ATTRIBUTES,tp);
+}
+
#endif