mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:07:45 +00:00
LibC: Stub out tcsendbreak(..) and tcdrain(..)
They are required for gdb to build.
This commit is contained in:
parent
6e2a82df13
commit
7828d4254e
2 changed files with 16 additions and 0 deletions
|
@ -30,6 +30,13 @@ int tcsetattr(int fd, int optional_actions, const struct termios* t)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://pubs.opengroup.org/onlinepubs/009695399/functions/tcsendbreak.html
|
||||||
|
int tcsendbreak([[maybe_unused]] int fd, [[maybe_unused]] int duration)
|
||||||
|
{
|
||||||
|
// FIXME: Implement this for real.
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int tcflow([[maybe_unused]] int fd, [[maybe_unused]] int action)
|
int tcflow([[maybe_unused]] int fd, [[maybe_unused]] int action)
|
||||||
{
|
{
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
|
@ -41,6 +48,13 @@ int tcflush(int fd, int queue_selector)
|
||||||
return ioctl(fd, TCFLSH, queue_selector);
|
return ioctl(fd, TCFLSH, queue_selector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://pubs.opengroup.org/onlinepubs/009695399/functions/tcdrain.html
|
||||||
|
int tcdrain([[maybe_unused]] int fd)
|
||||||
|
{
|
||||||
|
// FIXME: Implement this for real.
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
speed_t cfgetispeed(const struct termios* tp)
|
speed_t cfgetispeed(const struct termios* tp)
|
||||||
{
|
{
|
||||||
return tp->c_ispeed;
|
return tp->c_ispeed;
|
||||||
|
|
|
@ -10,8 +10,10 @@
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
|
int tcdrain(int fd);
|
||||||
int tcgetattr(int fd, struct termios*);
|
int tcgetattr(int fd, struct termios*);
|
||||||
int tcsetattr(int fd, int optional_actions, const struct termios*);
|
int tcsetattr(int fd, int optional_actions, const struct termios*);
|
||||||
|
int tcsendbreak(int fd, int duration);
|
||||||
int tcflow(int fd, int action);
|
int tcflow(int fd, int action);
|
||||||
int tcflush(int fd, int queue_selector);
|
int tcflush(int fd, int queue_selector);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue