Subversion Repositories HelenOS

Rev

Rev 2479 | Rev 2531 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2479 Rev 2529
Line 1... Line 1...
1
/*
1
/*
2
 * Copyright (c) 2006 Martin Decky
2
 * Copyright (c) 2006 Martin Decky
-
 
3
 * Copyright (c) 2007 Jakub Jermar
3
 * All rights reserved.
4
 * All rights reserved.
4
 *
5
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions
7
 * modification, are permitted provided that the following conditions
7
 * are met:
8
 * are met:
Line 29... Line 30...
29
/** @addtogroup fs
30
/** @addtogroup fs
30
 * @{
31
 * @{
31
 */
32
 */
32
 
33
 
33
/**
34
/**
34
 * @file    fs.c
35
 * @file    fat.c
35
 * @brief   File system driver for HelenOS.
36
 * @brief   FAT file system driver for HelenOS.
36
 */
37
 */
37
 
38
 
-
 
39
#include <ipc/ipc.h>
-
 
40
#include <ipc/services.h>
-
 
41
#include <errno.h>
-
 
42
#include <unistd.h>
-
 
43
#include "../../vfs/vfs.h"
-
 
44
 
-
 
45
vfs_info_t fat_vfs_info = {
-
 
46
    .name = "fat",
-
 
47
    .ops = {
-
 
48
        [IPC_METHOD_TO_VFS_OP(VFS_REGISTER)] = VFS_OP_DEFINED,
-
 
49
        [IPC_METHOD_TO_VFS_OP(VFS_MOUNT)] = VFS_OP_DEFINED,
-
 
50
        [IPC_METHOD_TO_VFS_OP(VFS_UNMOUNT)] = VFS_OP_DEFINED,
-
 
51
        [IPC_METHOD_TO_VFS_OP(VFS_LOOKUP)] = VFS_OP_DEFINED,
-
 
52
        [IPC_METHOD_TO_VFS_OP(VFS_OPEN)] = VFS_OP_DEFINED,
-
 
53
        [IPC_METHOD_TO_VFS_OP(VFS_CREATE)] = VFS_OP_DEFINED,
-
 
54
        [IPC_METHOD_TO_VFS_OP(VFS_CLOSE)] = VFS_OP_DEFINED,
-
 
55
        [IPC_METHOD_TO_VFS_OP(VFS_READ)] = VFS_OP_DEFINED,
-
 
56
        [IPC_METHOD_TO_VFS_OP(VFS_WRITE)] = VFS_OP_NULL,
-
 
57
        [IPC_METHOD_TO_VFS_OP(VFS_SEEK)] = VFS_OP_DEFAULT
-
 
58
    }
-
 
59
};
38
 
60
 
39
int main(int argc, char **argv)
61
int main(int argc, char **argv)
40
{
62
{
-
 
63
    ipcarg_t vfs_phone;
-
 
64
 
-
 
65
    vfs_phone = ipc_connect_me_to(PHONE_NS, SERVICE_VFS, 0);
-
 
66
    while (vfs_phone != EOK) {
-
 
67
        usleep(10000);
-
 
68
        vfs_phone = ipc_connect_me_to(PHONE_NS, SERVICE_VFS, 0);
-
 
69
    }
-
 
70
   
-
 
71
    /* TODO: start making calls according to the VFS protocol */
-
 
72
 
41
    return 0;
73
    return 0;
42
}
74
}
43
 
75
 
44
/**
76
/**
45
 * @}
77
 * @}