Rev 2535 | Rev 2543 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2535 | Rev 2542 | ||
|---|---|---|---|
| Line 30... | Line 30... | ||
| 30 | * @{ |
30 | * @{ |
| 31 | */ |
31 | */ |
| 32 | 32 | ||
| 33 | /** |
33 | /** |
| 34 | * @file vfs.c |
34 | * @file vfs.c |
| 35 | * @brief VFS multiplexer for HelenOS. |
35 | * @brief VFS service for HelenOS. |
| 36 | */ |
36 | */ |
| 37 | 37 | ||
| 38 | #include <ipc/ipc.h> |
38 | #include <ipc/ipc.h> |
| 39 | #include <ipc/services.h> |
39 | #include <ipc/services.h> |
| 40 | #include <async.h> |
40 | #include <async.h> |
| 41 | #include <errno.h> |
41 | #include <errno.h> |
| 42 | #include <stdio.h> |
42 | #include <stdio.h> |
| 43 | #include <bool.h> |
43 | #include <bool.h> |
| - | 44 | #include <string.h> |
|
| - | 45 | #include <as.h> |
|
| 44 | #include <libadt/list.h> |
46 | #include <libadt/list.h> |
| 45 | #include "vfs.h" |
47 | #include "vfs.h" |
| 46 | 48 | ||
| 47 | #define dprintf(...) printf(__VA_ARGS__) |
49 | #define dprintf(...) printf(__VA_ARGS__) |
| 48 | 50 | ||
| Line 106... | Line 108... | ||
| 106 | { |
108 | { |
| 107 | ipcarg_t phonead; |
109 | ipcarg_t phonead; |
| 108 | 110 | ||
| 109 | printf("VFS: HelenOS VFS server\n"); |
111 | printf("VFS: HelenOS VFS server\n"); |
| 110 | 112 | ||
| - | 113 | /* |
|
| - | 114 | * Initialize the list of registered file systems. |
|
| - | 115 | */ |
|
| 111 | list_initialize(&fs_head); |
116 | list_initialize(&fs_head); |
| - | 117 | ||
| - | 118 | /* |
|
| - | 119 | * Allocate and initialize the Path Lookup Buffer. |
|
| - | 120 | */ |
|
| - | 121 | list_initialize(&plb_head); |
|
| - | 122 | plb = as_get_mappable_page(PLB_SIZE); |
|
| - | 123 | // memset(plb, 0, PLB_SIZE); |
|
| - | 124 | ||
| - | 125 | /* |
|
| - | 126 | * Set a connectio handling function/fibril. |
|
| - | 127 | */ |
|
| 112 | async_set_client_connection(vfs_connection); |
128 | async_set_client_connection(vfs_connection); |
| - | 129 | ||
| - | 130 | /* |
|
| - | 131 | * Register at the naming service. |
|
| - | 132 | */ |
|
| 113 | ipc_connect_to_me(PHONE_NS, SERVICE_VFS, 0, &phonead); |
133 | ipc_connect_to_me(PHONE_NS, SERVICE_VFS, 0, &phonead); |
| - | 134 | ||
| - | 135 | /* |
|
| - | 136 | * Start accepting connections. |
|
| - | 137 | */ |
|
| 114 | async_manager(); |
138 | async_manager(); |
| 115 | return 0; |
139 | return 0; |
| 116 | } |
140 | } |
| 117 | 141 | ||
| 118 | /** |
142 | /** |