Subversion Repositories HelenOS

Rev

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

Rev 2644 Rev 2690
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
 * Copyright (c) 2008 Jakub Jermar
4
 * All rights reserved.
4
 * All rights reserved.
5
 *
5
 *
6
 * Redistribution and use in source and binary forms, with or without
6
 * Redistribution and use in source and binary forms, with or without
7
 * modification, are permitted provided that the following conditions
7
 * modification, are permitted provided that the following conditions
8
 * are met:
8
 * are met:
Line 48... Line 48...
48
 
48
 
49
 
49
 
50
vfs_info_t fat_vfs_info = {
50
vfs_info_t fat_vfs_info = {
51
    .name = "fat",
51
    .name = "fat",
52
    .ops = {
52
    .ops = {
53
        [IPC_METHOD_TO_VFS_OP(VFS_REGISTER)] = VFS_OP_DEFINED,
-
 
54
        [IPC_METHOD_TO_VFS_OP(VFS_MOUNT)] = VFS_OP_DEFINED,
-
 
55
        [IPC_METHOD_TO_VFS_OP(VFS_UNMOUNT)] = VFS_OP_DEFINED,
-
 
56
        [IPC_METHOD_TO_VFS_OP(VFS_LOOKUP)] = VFS_OP_DEFINED,
53
        [IPC_METHOD_TO_VFS_OP(VFS_LOOKUP)] = VFS_OP_DEFINED,
57
        [IPC_METHOD_TO_VFS_OP(VFS_OPEN)] = VFS_OP_DEFINED,
54
        [IPC_METHOD_TO_VFS_OP(VFS_OPEN)] = VFS_OP_DEFINED,
58
        [IPC_METHOD_TO_VFS_OP(VFS_CREATE)] = VFS_OP_DEFINED,
-
 
59
        [IPC_METHOD_TO_VFS_OP(VFS_CLOSE)] = VFS_OP_DEFINED,
55
        [IPC_METHOD_TO_VFS_OP(VFS_CLOSE)] = VFS_OP_DEFINED,
60
        [IPC_METHOD_TO_VFS_OP(VFS_READ)] = VFS_OP_DEFINED,
56
        [IPC_METHOD_TO_VFS_OP(VFS_READ)] = VFS_OP_DEFINED,
61
        [IPC_METHOD_TO_VFS_OP(VFS_WRITE)] = VFS_OP_NULL,
57
        [IPC_METHOD_TO_VFS_OP(VFS_WRITE)] = VFS_OP_NULL,
-
 
58
        [IPC_METHOD_TO_VFS_OP(VFS_TRUNCATE)] = VFS_OP_NULL,
62
        [IPC_METHOD_TO_VFS_OP(VFS_SEEK)] = VFS_OP_DEFAULT
59
        [IPC_METHOD_TO_VFS_OP(VFS_RENAME)] = VFS_OP_NULL,
-
 
60
        [IPC_METHOD_TO_VFS_OP(VFS_OPENDIR)] = VFS_OP_NULL,
-
 
61
        [IPC_METHOD_TO_VFS_OP(VFS_READDIR)] = VFS_OP_NULL,
-
 
62
        [IPC_METHOD_TO_VFS_OP(VFS_CLOSEDIR)] = VFS_OP_NULL,
-
 
63
        [IPC_METHOD_TO_VFS_OP(VFS_UNLINK)] = VFS_OP_NULL,
-
 
64
        [IPC_METHOD_TO_VFS_OP(VFS_MOUNT)] = VFS_OP_NULL,
-
 
65
        [IPC_METHOD_TO_VFS_OP(VFS_UNMOUNT)] = VFS_OP_NULL,
63
    }
66
    }
64
};
67
};
65
 
68
 
66
fs_reg_t fat_reg;
69
fs_reg_t fat_reg;
67
 
70
 
Line 99... Line 102...
99
        ipc_callid_t callid;
102
        ipc_callid_t callid;
100
        ipc_call_t call;
103
        ipc_call_t call;
101
   
104
   
102
        callid = async_get_call(&call);
105
        callid = async_get_call(&call);
103
        switch  (IPC_GET_METHOD(call)) {
106
        switch  (IPC_GET_METHOD(call)) {
104
        case VFS_REGISTER:
-
 
105
            ipc_answer_0(callid, EOK);
-
 
106
            break;
-
 
107
        case VFS_LOOKUP:
107
        case VFS_LOOKUP:
108
            fat_lookup(callid, &call);
108
            fat_lookup(callid, &call);
109
            break;
109
            break;
110
        default:
110
        default:
111
            ipc_answer_0(callid, ENOTSUP);
111
            ipc_answer_0(callid, ENOTSUP);