Changeset 37e7dc54 in mainline for uspace/srv/vfs/vfs_register.c
- Timestamp:
- 2007-09-27T15:27:53Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6c117bb
- Parents:
- bcf23cf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_register.c
rbcf23cf r37e7dc54 46 46 #include <bool.h> 47 47 #include <futex.h> 48 #include <as.h> 48 49 #include <libadt/list.h> 49 50 #include "vfs.h" … … 175 176 return; 176 177 } 178 179 /* 180 * Allocate and initialize a buffer for the fs_info structure. 181 */ 177 182 fs_info_t *fs_info; 178 179 /*180 * Allocate and initialize a buffer for the fs_info structure.181 */182 183 fs_info = (fs_info_t *) malloc(sizeof(fs_info_t)); 183 184 if (!fs_info) { … … 262 263 dprintf("Callback connection to FS created.\n"); 263 264 265 /* 266 * The client will want us to send him the address space area with PLB. 267 */ 268 callid = async_get_call(&call); 269 if (IPC_GET_METHOD(call) != IPC_M_AS_AREA_RECV) { 270 dprintf("Unexpected call, method = %d\n", IPC_GET_METHOD(call)); 271 list_remove(&fs_info->fs_link); 272 futex_up(&fs_head_futex); 273 ipc_hangup(fs_info->phone); 274 free(fs_info); 275 ipc_answer_fast(callid, EINVAL, 0, 0); 276 ipc_answer_fast(rid, EINVAL, 0, 0); 277 return; 278 } 279 280 /* 281 * We can only send the client address space area PLB_SIZE bytes long. 282 */ 283 size = IPC_GET_ARG2(call); 284 if (size != PLB_SIZE) { 285 dprintf("Client suggests wrong size of PFB, size = %d\n", size); 286 list_remove(&fs_info->fs_link); 287 futex_up(&fs_head_futex); 288 ipc_hangup(fs_info->phone); 289 free(fs_info); 290 ipc_answer_fast(callid, EINVAL, 0, 0); 291 ipc_answer_fast(rid, EINVAL, 0, 0); 292 return; 293 294 } 295 296 /* 297 * Commit to read-only sharing the PLB with the client. 298 */ 299 ipc_answer_fast(callid, EOK, (ipcarg_t) plb, 300 (ipcarg_t) (AS_AREA_READ | AS_AREA_CACHEABLE)); 301 302 dprintf("Sharing PLB.\n"); 303 264 304 futex_up(&fs_head_futex); 265 305
Note:
See TracChangeset
for help on using the changeset viewer.