summaryrefslogtreecommitdiff
path: root/src/user/app/init/driver/ansiterm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/app/init/driver/ansiterm.c')
-rw-r--r--src/user/app/init/driver/ansiterm.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/user/app/init/driver/ansiterm.c b/src/user/app/init/driver/ansiterm.c
index 5daab41..0c720eb 100644
--- a/src/user/app/init/driver/ansiterm.c
+++ b/src/user/app/init/driver/ansiterm.c
@@ -84,10 +84,14 @@ void ansiterm_drv(void) {
break;
case VFSOP_WRITE:
- for (size_t i = 0; i < res.len; i++)
- in_char(buf[i]);
- /* if (pendingFlush) */ flush();
- _syscall_fs_respond(NULL, res.len, 0);
+ if (res.flags) {
+ _syscall_fs_respond(NULL, -1, 0);
+ } else {
+ for (size_t i = 0; i < res.len; i++)
+ in_char(buf[i]);
+ /* if (pendingFlush) */ flush();
+ _syscall_fs_respond(NULL, res.len, 0);
+ }
break;
default: