git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Modules/UDI - (minor) tiny fiddle to udic planning
[tpg/acess2.git]
/
Usermode
/
Libraries
/
libposix.so_src
/
termios.c
diff --git
a/Usermode/Libraries/libposix.so_src/termios.c
b/Usermode/Libraries/libposix.so_src/termios.c
index
57b1b42
..
d3aaefa
100644
(file)
--- a/
Usermode/Libraries/libposix.so_src/termios.c
+++ b/
Usermode/Libraries/libposix.so_src/termios.c
@@
-12,6
+12,11
@@
#include <acess/devices/pty.h>
// === CODE ===
#include <acess/devices/pty.h>
// === CODE ===
+speed_t cfgetospeed(const struct termios *termios_p)
+{
+ return termios_p->c_oflag & CBAUD;
+}
+
int tcgetattr(int fd, struct termios *termios_p)
{
if( fd == -1 ) {
int tcgetattr(int fd, struct termios *termios_p)
{
if( fd == -1 ) {
@@
-59,6
+64,8
@@
int tcsetattr(int fd, int optional_actions, const struct termios *termios_p)
errno = EINVAL;
return -1;
}
errno = EINVAL;
return -1;
}
+ _SysDebug("*termios_p = {%x,%x,%x,%x}",
+ termios_p->c_iflag, termios_p->c_oflag, termios_p->c_cflag, termios_p->c_lflag);
// Double-check `fd` describes a terminal
if( _SysIOCtl(fd, DRV_IOCTL_TYPE, NULL) != DRV_TYPE_TERMINAL ) {
// Double-check `fd` describes a terminal
if( _SysIOCtl(fd, DRV_IOCTL_TYPE, NULL) != DRV_TYPE_TERMINAL ) {
@@
-66,15
+73,14
@@
int tcsetattr(int fd, int optional_actions, const struct termios *termios_p)
return -1;
}
return -1;
}
- struct ptymode mode = {0};
+ struct ptymode mode = {0
,0
};
if(termios_p->c_lflag & ICANON)
mode.InputMode |= PTYIMODE_CANON;
if(termios_p->c_lflag & ECHO)
mode.InputMode |= PTYIMODE_ECHO;
if(termios_p->c_lflag & ICANON)
mode.InputMode |= PTYIMODE_CANON;
if(termios_p->c_lflag & ECHO)
mode.InputMode |= PTYIMODE_ECHO;
- _SysDebug("*termios_p = {%x,%x,%x,%x}",
- termios_p->c_iflag, termios_p->c_oflag, termios_p->c_cflag, termios_p->c_lflag);
+ _SysIOCtl(fd, PTY_IOCTL_SETMODE, &mode);
return 0;
}
return 0;
}
UCC
git Repository :: git.ucc.asn.au