git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change of vterm handling logic on backend chardev input event (#40)
[lunaix-os.git]
/
lunaix-os
/
usr
/
libc
/
includes
/
termios.h
diff --git
a/lunaix-os/usr/libc/includes/termios.h
b/lunaix-os/usr/libc/includes/termios.h
index 42ad0ac86ed0b2cc85c97ba7015c00b91a70596b..abdcf8562b1321b523a29315215b0bfea7f308b1 100644
(file)
--- a/
lunaix-os/usr/libc/includes/termios.h
+++ b/
lunaix-os/usr/libc/includes/termios.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)
{
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)
{
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;
}
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 *);
int tcsendbreak(int, int);
int tcsetattr(int, int, const struct termios *);
-
#endif /* __LUNAIX_TERMIOS_H */
#endif /* __LUNAIX_TERMIOS_H */