Add a case statement for each message type to the VFS
This commit is contained in:
parent
ac6dc49233
commit
6fe1db6956
24
vfs/main.c
24
vfs/main.c
@ -17,7 +17,29 @@ int main() {
|
||||
yield();
|
||||
Message msg;
|
||||
vfs_message* vfs_msg=get_message(&msg,box);
|
||||
vfs_msg->fd=2;
|
||||
switch (vfs_msg->type) {
|
||||
case VFS_OPEN:
|
||||
vfs_msg->flags=1;
|
||||
break;
|
||||
case VFS_PUTC:
|
||||
vfs_msg->flags=1;
|
||||
break;
|
||||
case VFS_GETC:
|
||||
vfs_msg->flags=1;
|
||||
break;
|
||||
case VFS_CLOSE:
|
||||
vfs_msg->flags=1;
|
||||
break;
|
||||
case VFS_MOUNT:
|
||||
vfs_msg->flags=1;
|
||||
break;
|
||||
case VFS_UMOUNT:
|
||||
vfs_msg->flags=1;
|
||||
break;
|
||||
default:
|
||||
vfs_msg->flags=2;
|
||||
break;
|
||||
}
|
||||
mailbox_send_msg(&msg);
|
||||
yield();
|
||||
for (;;);
|
||||
|
Loading…
Reference in New Issue
Block a user