From edbcac06e490731c923ddd18d948fa76dc3ee9b7 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Tue, 2 Dec 2014 12:39:30 +0100 Subject: Adapt for ncurses --- userspace/sys/sys.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) (limited to 'userspace/sys/sys.c') diff --git a/userspace/sys/sys.c b/userspace/sys/sys.c index 1ab3579..a9d54ce 100644 --- a/userspace/sys/sys.c +++ b/userspace/sys/sys.c @@ -1,6 +1,7 @@ #include #include #include +#include // CODE FOR Stack Smashing Protector, TODO: MOVE / and do not duplicate @@ -85,3 +86,62 @@ int chown(const char *path, uid_t owner, gid_t group) { return -1; } + +// termios / ncurses +int tcgetattr(int fd, struct termios *termios_p) +{ + return 0; +} +int tcsetattr(int fd, int optional_actions, const struct termios *termios_p){ + return 0; +} +int mkdir(const char *pathname, mode_t mode) +{ + return -1; +} +int chdir (const char *pathname) +{ + return -1; +} + +speed_t cfgetospeed(const struct termios *termios_p) +{ + return 1; +} + +char *ttyname(int fd) +{ + return "foolterm"; +} + + +DIR *opendir(const char *name) +{ + return 0; +} +int closedir(DIR *dirp) +{ + return 0; +} + + +int tcflush(int fd, int queue_selector) +{ + return -1; +} +long fpathconf(int fd, int name) +{ + return -1; +} + + +unsigned int sleep(unsigned int seconds) +{ + return 0; +} + +char *getlogin(void) +{ + return NULL; +} + -- cgit v1.2.3