make rule for user header file install
[lunaix-os.git] / lunaix-os / usr / libc / includes / termios.h
index 42ad0ac86ed0b2cc85c97ba7015c00b91a70596b..aa4478dc06a540f1b2430bc1cfe031cf5de48cbb 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __LUNAIX_TERMIOS_H
-#define __LUNAIX_TERMIOS_H
+#ifndef __LUNALIBC_TERMIOS_H
+#define __LUNALIBC_TERMIOS_H
 
 #include <lunaix/term.h>
 
@@ -89,12 +89,20 @@ static inline speed_t cfgetospeed(const struct termios* termios) { return termio
 
 static inline int cfsetispeed(struct termios* termios, speed_t baud)
 {
+    if (baud > B38400) {
+        return -1;
+    }
+
     termios->c_baud = baud;
     return 0;
 }
 
 static inline int cfsetospeed(struct termios* termios, speed_t baud)
 {
+    if (baud > B38400) {
+        return -1;
+    }
+
     termios->c_baud = baud;
     return 0;
 }
@@ -110,5 +118,4 @@ int     tcgetattr(int, struct termios *);
 int     tcsendbreak(int, int);
 int     tcsetattr(int, int, const struct termios *);
 
-
-#endif /* __LUNAIX_TERMIOS_H */
+#endif /* __LUNALIBC_TERMIOS_H */