Rev 4348 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4348 | Rev 4691 | ||
---|---|---|---|
Line 94... | Line 94... | ||
94 | ipc_callid_t callid; |
94 | ipc_callid_t callid; |
95 | ipc_call_t call; |
95 | ipc_call_t call; |
96 | 96 | ||
97 | callid = async_get_call(&call); |
97 | callid = async_get_call(&call); |
98 | switch (IPC_GET_METHOD(call)) { |
98 | switch (IPC_GET_METHOD(call)) { |
- | 99 | case IPC_M_PHONE_HUNGUP: |
|
- | 100 | return; |
|
99 | case VFS_MOUNTED: |
101 | case VFS_OUT_MOUNTED: |
100 | tmpfs_mounted(callid, &call); |
102 | tmpfs_mounted(callid, &call); |
101 | break; |
103 | break; |
102 | case VFS_MOUNT: |
104 | case VFS_OUT_MOUNT: |
103 | tmpfs_mount(callid, &call); |
105 | tmpfs_mount(callid, &call); |
104 | break; |
106 | break; |
105 | case VFS_LOOKUP: |
107 | case VFS_OUT_LOOKUP: |
106 | tmpfs_lookup(callid, &call); |
108 | tmpfs_lookup(callid, &call); |
107 | break; |
109 | break; |
108 | case VFS_READ: |
110 | case VFS_OUT_READ: |
109 | tmpfs_read(callid, &call); |
111 | tmpfs_read(callid, &call); |
110 | break; |
112 | break; |
111 | case VFS_WRITE: |
113 | case VFS_OUT_WRITE: |
112 | tmpfs_write(callid, &call); |
114 | tmpfs_write(callid, &call); |
113 | break; |
115 | break; |
114 | case VFS_TRUNCATE: |
116 | case VFS_OUT_TRUNCATE: |
115 | tmpfs_truncate(callid, &call); |
117 | tmpfs_truncate(callid, &call); |
116 | break; |
118 | break; |
- | 119 | case VFS_OUT_CLOSE: |
|
- | 120 | tmpfs_close(callid, &call); |
|
- | 121 | break; |
|
117 | case VFS_DESTROY: |
122 | case VFS_OUT_DESTROY: |
118 | tmpfs_destroy(callid, &call); |
123 | tmpfs_destroy(callid, &call); |
119 | break; |
124 | break; |
- | 125 | case VFS_OUT_OPEN_NODE: |
|
- | 126 | tmpfs_open_node(callid, &call); |
|
- | 127 | break; |
|
- | 128 | case VFS_OUT_STAT: |
|
- | 129 | tmpfs_stat(callid, &call); |
|
- | 130 | break; |
|
- | 131 | case VFS_OUT_SYNC: |
|
- | 132 | tmpfs_sync(callid, &call); |
|
- | 133 | break; |
|
120 | default: |
134 | default: |
121 | ipc_answer_0(callid, ENOTSUP); |
135 | ipc_answer_0(callid, ENOTSUP); |
122 | break; |
136 | break; |
123 | } |
137 | } |
124 | } |
138 | } |
Line 136... | Line 150... | ||
136 | int vfs_phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_VFS, 0, 0); |
150 | int vfs_phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_VFS, 0, 0); |
137 | if (vfs_phone < EOK) { |
151 | if (vfs_phone < EOK) { |
138 | printf(NAME ": Unable to connect to VFS\n"); |
152 | printf(NAME ": Unable to connect to VFS\n"); |
139 | return -1; |
153 | return -1; |
140 | } |
154 | } |
141 | 155 | ||
142 | int rc = fs_register(vfs_phone, &tmpfs_reg, &tmpfs_vfs_info, |
156 | int rc = fs_register(vfs_phone, &tmpfs_reg, &tmpfs_vfs_info, |
143 | tmpfs_connection); |
157 | tmpfs_connection); |
144 | if (rc != EOK) { |
158 | if (rc != EOK) { |
145 | printf(NAME ": Failed to register file system (%d)\n", rc); |
159 | printf(NAME ": Failed to register file system (%d)\n", rc); |
146 | return rc; |
160 | return rc; |