diff options
author | dzwdz | 2021-08-25 12:58:27 +0200 |
---|---|---|
committer | dzwdz | 2021-08-25 12:58:27 +0200 |
commit | 3ac131ea956fd62df966bac75e8d7f0c0434d68d (patch) | |
tree | a91f3242a5f7b29b587aa9064cc10aa060083ae5 /src/kernel/fd.c | |
parent | 75fc5c8f30b0a5dd5837df35948fc92861f30552 (diff) |
implement FDOP_MOUNT
Diffstat (limited to 'src/kernel/fd.c')
-rw-r--r-- | src/kernel/fd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/kernel/fd.c b/src/kernel/fd.c index 77fea05..810cdb7 100644 --- a/src/kernel/fd.c +++ b/src/kernel/fd.c @@ -7,8 +7,11 @@ static int fdop_special_tty(struct fdop_args *args); int fdop_dispatch(struct fdop_args args) { switch(args.fd->type) { - case FD_EMPTY: + case FD_EMPTY: { + if (args.type == FDOP_MOUNT) // mounting an empty fd is allowed + return 0; return -1; + } case FD_SPECIAL_TTY: return fdop_special_tty(&args); default: @@ -18,6 +21,9 @@ int fdop_dispatch(struct fdop_args args) { static int fdop_special_tty(struct fdop_args *args) { switch(args->type) { + case FDOP_MOUNT: + return 0; // no special action needed + case FDOP_READ: return -1; // input not implemented yet |