summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/kernel/arch/i386/driver/fsroot.c2
-rw-r--r--src/kernel/arch/i386/driver/ps2.c2
-rw-r--r--src/kernel/arch/i386/driver/serial.c2
-rw-r--r--src/user/driver/ansiterm.c4
-rw-r--r--src/user/driver/ps2.c4
-rw-r--r--src/user/fs/misc.c5
-rw-r--r--src/user/fs/tar.c4
7 files changed, 2 insertions, 21 deletions
diff --git a/src/kernel/arch/i386/driver/fsroot.c b/src/kernel/arch/i386/driver/fsroot.c
index d22cde7..8b1b307 100644
--- a/src/kernel/arch/i386/driver/fsroot.c
+++ b/src/kernel/arch/i386/driver/fsroot.c
@@ -48,8 +48,6 @@ static int handle(struct vfs_request *req) {
int id = (int)req->id;
switch (req->type) {
case VFSOP_OPEN:
- if (req->flags & OPEN_CREATE) return -1;
-
if (exacteq(req, "/")) return HANDLE_ROOT;
if (exacteq(req, "/vga")) return HANDLE_VGA;
diff --git a/src/kernel/arch/i386/driver/ps2.c b/src/kernel/arch/i386/driver/ps2.c
index ef45810..341a7d3 100644
--- a/src/kernel/arch/i386/driver/ps2.c
+++ b/src/kernel/arch/i386/driver/ps2.c
@@ -34,7 +34,7 @@ static void accept(struct vfs_request *req) {
bool valid;
switch (req->type) {
case VFSOP_OPEN:
- valid = req->input.len == 0 && !(req->flags & OPEN_CREATE);
+ valid = req->input.len == 0;
vfsreq_finish_short(req, valid ? 0 : -1);
break;
case VFSOP_READ:
diff --git a/src/kernel/arch/i386/driver/serial.c b/src/kernel/arch/i386/driver/serial.c
index 7a727a8..d339484 100644
--- a/src/kernel/arch/i386/driver/serial.c
+++ b/src/kernel/arch/i386/driver/serial.c
@@ -72,7 +72,7 @@ static void accept(struct vfs_request *req) {
bool valid;
switch (req->type) {
case VFSOP_OPEN:
- valid = req->input.len == 0 && !(req->flags & OPEN_CREATE);
+ valid = req->input.len == 0;
vfsreq_finish_short(req, valid ? 0 : -1);
break;
case VFSOP_READ:
diff --git a/src/user/driver/ansiterm.c b/src/user/driver/ansiterm.c
index e332ca2..4b9f0d0 100644
--- a/src/user/driver/ansiterm.c
+++ b/src/user/driver/ansiterm.c
@@ -78,10 +78,6 @@ void ansiterm_drv(void) {
while (!_syscall_fs_wait(buf, sizeof buf, &res)) {
switch (res.op) {
case VFSOP_OPEN:
- if (res.flags & OPEN_CREATE) {
- _syscall_fs_respond(NULL, -1, 0);
- break;
- }
// TODO check path
_syscall_fs_respond(NULL, 0, 0);
break;
diff --git a/src/user/driver/ps2.c b/src/user/driver/ps2.c
index b2811c3..fd81882 100644
--- a/src/user/driver/ps2.c
+++ b/src/user/driver/ps2.c
@@ -55,10 +55,6 @@ static void main_loop(void) {
while (!_syscall_fs_wait(buf, sizeof buf, &res)) {
switch (res.op) {
case VFSOP_OPEN:
- if (res.flags & OPEN_CREATE) {
- _syscall_fs_respond(NULL, -1, 0);
- break;
- }
_syscall_fs_respond(NULL, 1, 0);
break;
diff --git a/src/user/fs/misc.c b/src/user/fs/misc.c
index b3e1a2c..fa1115d 100644
--- a/src/user/fs/misc.c
+++ b/src/user/fs/misc.c
@@ -104,11 +104,6 @@ void fs_dir_inject(const char *path) {
{
/* opening a directory that we're injecting into */
- if (res.flags & OPEN_CREATE) {
- _syscall_fs_respond(NULL, -1, 0);
- break;
- }
-
data = malloc(sizeof *data);
data->delegate = _syscall_open(buf, res.len, res.flags);
data->inject = path + res.len;
diff --git a/src/user/fs/tar.c b/src/user/fs/tar.c
index 4b4a9a3..60deccd 100644
--- a/src/user/fs/tar.c
+++ b/src/user/fs/tar.c
@@ -22,10 +22,6 @@ void tar_driver(void *base) {
while (!_syscall_fs_wait(buf, BUF_SIZE, &res)) {
switch (res.op) {
case VFSOP_OPEN:
- if (res.flags & OPEN_CREATE) {
- _syscall_fs_respond(NULL, -1, 0);
- break;
- }
ptr = tar_open(buf, res.len, base, ~0);
_syscall_fs_respond(ptr, ptr ? 0 : -1, 0);
break;