Mount now sends a message to the fs driver

This commit is contained in:
pjht 2019-08-31 10:37:49 -05:00
parent 772a121dd8
commit 36188f9cbc
2 changed files with 20 additions and 0 deletions

View File

@ -175,6 +175,11 @@ int main() {
load_task(datapos,initrd);
free(initrd);
yieldToPID(3);
serial_print("MOUNT\n");
vga_write_string("CALLING MOUNT\n");
mount("","devfs","/dev");
serial_print("MOUNT SUCSESFULL\n");
vga_write_string("MOUNT SUCSESFULL\n");
FILE* file;
do {
vga_write_string("CALLING FOPEN\n");

View File

@ -203,6 +203,21 @@ void vfs_mount(vfs_message* vfs_msg, uint32_t from) {
vfs_msg->flags=2;
return;
}
msg.from=box;
msg.to=drvs[i];
msg.size=sizeof(vfs_message);
msg.msg=vfs_msg;
mailbox_send_msg(&msg);
msg.size=vfs_msg->data;
msg.msg=disk_file;
mailbox_send_msg(&msg);
yield();
msg.size=sizeof(vfs_message);
vfs_message* resp=get_message(&msg);
if (resp->flags!=0) {
vfs_msg->flags=resp->flags;
return;
}
if (head_mapping==NULL) {
vfs_mapping* mapping=malloc(sizeof(vfs_mapping));
mapping->mntpnt=malloc(sizeof(char)*(strlen(path)+1));