-#ifndef __LUNAIX_TERMIOS_H
-#define __LUNAIX_TERMIOS_H
+#ifndef __LUNALIBC_TERMIOS_H
+#define __LUNALIBC_TERMIOS_H
#include <lunaix/term.h>
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;
}
int tcsendbreak(int, int);
int tcsetattr(int, int, const struct termios *);
-
-#endif /* __LUNAIX_TERMIOS_H */
+#endif /* __LUNALIBC_TERMIOS_H */