43,7 → 43,6 |
#include <bool.h> |
#include <string.h> |
#include <as.h> |
#include <adt/list.h> |
#include <atomic.h> |
#include "vfs.h" |
|
80,56 → 79,52 |
case IPC_M_PHONE_HUNGUP: |
keep_on_going = false; |
break; |
case VFS_REGISTER: |
case VFS_IN_REGISTER: |
vfs_register(callid, &call); |
/* |
* Keep the connection open so that a file system can |
* later ask us to connect it to another file system. |
* This is necessary to support non-root mounts. |
*/ |
keep_on_going = false; |
break; |
case VFS_MOUNT: |
case VFS_IN_MOUNT: |
vfs_mount(callid, &call); |
break; |
case VFS_OPEN: |
case VFS_IN_OPEN: |
vfs_open(callid, &call); |
break; |
case VFS_OPEN_NODE: |
case VFS_IN_OPEN_NODE: |
vfs_open_node(callid, &call); |
break; |
case VFS_CLOSE: |
case VFS_IN_CLOSE: |
vfs_close(callid, &call); |
break; |
case VFS_READ: |
case VFS_IN_READ: |
vfs_read(callid, &call); |
break; |
case VFS_WRITE: |
case VFS_IN_WRITE: |
vfs_write(callid, &call); |
break; |
case VFS_SEEK: |
case VFS_IN_SEEK: |
vfs_seek(callid, &call); |
break; |
case VFS_TRUNCATE: |
case VFS_IN_TRUNCATE: |
vfs_truncate(callid, &call); |
break; |
case VFS_MKDIR: |
case VFS_IN_FSTAT: |
vfs_fstat(callid, &call); |
break; |
case VFS_IN_STAT: |
vfs_stat(callid, &call); |
break; |
case VFS_IN_MKDIR: |
vfs_mkdir(callid, &call); |
break; |
case VFS_UNLINK: |
case VFS_IN_UNLINK: |
vfs_unlink(callid, &call); |
break; |
case VFS_RENAME: |
case VFS_IN_RENAME: |
vfs_rename(callid, &call); |
break; |
case VFS_DEVICE: |
vfs_device(callid, &call); |
break; |
case VFS_SYNC: |
case VFS_IN_SYNC: |
vfs_sync(callid, &call); |
break; |
case VFS_NODE: |
vfs_node(callid, &call); |
break; |
default: |
ipc_answer_0(callid, ENOTSUP); |
break; |
144,11 → 139,6 |
printf(NAME ": HelenOS VFS server\n"); |
|
/* |
* Initialize the list of registered file systems. |
*/ |
list_initialize(&fs_head); |
|
/* |
* Initialize VFS node hash table. |
*/ |
if (!vfs_nodes_init()) { |
159,7 → 149,6 |
/* |
* Allocate and initialize the Path Lookup Buffer. |
*/ |
list_initialize(&plb_head); |
plb = as_get_mappable_page(PLB_SIZE); |
if (!plb) { |
printf(NAME ": Cannot allocate a mappable piece of address space\n"); |
174,11 → 163,10 |
memset(plb, 0, PLB_SIZE); |
|
/* |
* Set a connectio handling function/fibril. |
* Set a connection handling function/fibril. |
*/ |
async_set_pending(vfs_process_pending_mount); |
async_set_client_connection(vfs_connection); |
|
|
/* |
* Register at the naming service. |
*/ |