feat: hook up the keyboard input into our vfs
[lunaix-os.git] / lunaix-os / kernel / fs / vfs.c
index 53d21d8b026baa7f07ce38bc34a12cda78c0ee90..1104d9b5533d9673f58722162c091a8da1d3c6ad 100644 (file)
@@ -657,7 +657,9 @@ __DEFINE_LXSYSCALL3(int, read, int, fd, void*, buf, size_t, count)
         goto done;
     }
 
+    cpu_enable_interrupt();
     errno = file->ops.read(file, buf, count, file->f_pos);
+    cpu_disable_interrupt();
 
     if (errno > 0) {
         file->f_pos += errno;
@@ -683,7 +685,9 @@ __DEFINE_LXSYSCALL3(int, write, int, fd, void*, buf, size_t, count)
         goto done;
     }
 
+    cpu_enable_interrupt();
     errno = file->ops.write(file, buf, count, file->f_pos);
+    cpu_disable_interrupt();
 
     if (errno > 0) {
         file->f_pos += errno;