summaryrefslogtreecommitdiff
path: root/src/kernel/arch/i386
diff options
context:
space:
mode:
authordzwdz2022-07-12 22:25:46 +0200
committerdzwdz2022-07-12 22:25:46 +0200
commitf9c1ceb309a85226b950c05e31f0f3cb1614dd4d (patch)
treef837f6f86a6934ae74c69c381b8408c3e6a39203 /src/kernel/arch/i386
parenta854f2979a86f76bd6405041bf5227257548acf3 (diff)
remove the incorrect OPEN_CREATE guards in fs drivers
Diffstat (limited to 'src/kernel/arch/i386')
-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
3 files changed, 2 insertions, 4 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: