41,8 → 41,11 |
#include <async.h> |
#include <errno.h> |
#include <unistd.h> |
#include <stdio.h>> |
#include "../../vfs/vfs.h" |
|
#define dprintf(...) printf(__VA_ARGS__) |
|
vfs_info_t fat_vfs_info = { |
.name = "fat", |
.ops = { |
64,6 → 67,7 |
*/ |
void fat_connection(ipc_callid_t iid, ipc_call_t *icall) |
{ |
dprintf("Callback connection established.\n"); |
while (1) { |
ipc_callid_t callid; |
ipc_call_t call; |
75,10 → 79,12 |
|
int main(int argc, char **argv) |
{ |
ipcarg_t vfs_phone; |
int vfs_phone; |
|
printf("FAT: HelenOS FAT file system server.\n"); |
|
vfs_phone = ipc_connect_me_to(PHONE_NS, SERVICE_VFS, 0); |
while (vfs_phone != EOK) { |
while (vfs_phone < EOK) { |
usleep(10000); |
vfs_phone = ipc_connect_me_to(PHONE_NS, SERVICE_VFS, 0); |
} |
107,6 → 113,13 |
ipc_connect_to_me(vfs_phone, 0, 0, &phonehash); |
|
async_new_connection(phonehash, 0, NULL, fat_connection); |
|
/* |
* Pick up the answer for the request to the VFS_REQUEST call. |
*/ |
async_wait_for(req, NULL); |
dprintf("FAT filesystem registered.\n"); |
async_manager(); |
return 0; |
} |
|