Changeset 0013b9ce in mainline
- Timestamp:
- 2008-11-23T12:27:15Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7782030
- Parents:
- f714576
- Location:
- uspace
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libfs/libfs.c
rf714576 r0013b9ce 197 197 index); 198 198 if (nodep) { 199 if (!ops->link(cur, nodep, component)) { 199 int rc; 200 201 rc = ops->link(cur, nodep, component); 202 if (rc != EOK) { 200 203 if (lflag & L_CREATE) { 201 204 (void)ops->destroy( 202 205 nodep); 203 206 } 204 ipc_answer_0(rid, ENOSPC);207 ipc_answer_0(rid, rc); 205 208 } else { 206 209 ipc_answer_5(rid, EOK, … … 267 270 nodep = ops->node_get(dev_handle, index); 268 271 if (nodep) { 269 if (!ops->link(cur, nodep, component)) { 272 int rc; 273 274 rc = ops->link(cur, nodep, component); 275 if (rc != EOK) { 270 276 if (lflag & L_CREATE) 271 277 (void)ops->destroy(nodep); 272 ipc_answer_0(rid, ENOSPC);278 ipc_answer_0(rid, rc); 273 279 } else { 274 280 ipc_answer_5(rid, EOK, -
uspace/lib/libfs/libfs.h
rf714576 r0013b9ce 48 48 void * (* create)(dev_handle_t, int); 49 49 int (* destroy)(void *); 50 bool(* link)(void *, void *, const char *);50 int (* link)(void *, void *, const char *); 51 51 int (* unlink)(void *, void *); 52 52 fs_index_t (* index_get)(void *); -
uspace/srv/fs/fat/fat_ops.c
rf714576 r0013b9ce 224 224 static void *fat_create_node(dev_handle_t, int); 225 225 static int fat_destroy_node(void *); 226 static boolfat_link(void *, void *, const char *);226 static int fat_link(void *, void *, const char *); 227 227 static int fat_unlink(void *, void *); 228 228 static void *fat_match(void *, const char *); … … 342 342 } 343 343 344 boolfat_link(void *prnt, void *chld, const char *name)345 { 346 return false; /* not supported at the moment */344 int fat_link(void *prnt, void *chld, const char *name) 345 { 346 return ENOTSUP; /* not supported at the moment */ 347 347 } 348 348 … … 526 526 }; 527 527 528 /* 529 * VFS operations. 530 */ 531 528 532 void fat_mounted(ipc_callid_t rid, ipc_call_t *request) 529 533 { -
uspace/srv/fs/tmpfs/tmpfs_dump.c
rf714576 r0013b9ce 60 60 struct rdentry entry; 61 61 libfs_ops_t *ops = &tmpfs_libfs_ops; 62 int rc; 62 63 63 64 do { … … 94 95 fname[entry.len] = 0; 95 96 96 if (!ops->link((void *) parent, (void *) node, fname)) { 97 rc = ops->link((void *) parent, (void *) node, fname); 98 if (rc != EOK) { 97 99 ops->destroy((void *) node); 98 100 free(fname); … … 135 137 } 136 138 fname[entry.len] = 0; 137 138 if (!ops->link((void *) parent, (void *) node, fname)) { 139 140 rc = ops->link((void *) parent, (void *) node, fname); 141 if (rc != EOK) { 139 142 ops->destroy((void *) node); 140 143 free(fname); -
uspace/srv/fs/tmpfs/tmpfs_ops.c
rf714576 r0013b9ce 76 76 static void tmpfs_node_put(void *); 77 77 static void *tmpfs_create_node(dev_handle_t, int); 78 static booltmpfs_link_node(void *, void *, const char *);78 static int tmpfs_link_node(void *, void *, const char *); 79 79 static int tmpfs_unlink_node(void *, void *); 80 80 static int tmpfs_destroy_node(void *); … … 309 309 } 310 310 311 booltmpfs_link_node(void *prnt, void *chld, const char *nm)311 int tmpfs_link_node(void *prnt, void *chld, const char *nm) 312 312 { 313 313 tmpfs_dentry_t *parentp = (tmpfs_dentry_t *) prnt; … … 318 318 tmpfs_name_t *namep = malloc(sizeof(tmpfs_name_t)); 319 319 if (!namep) 320 return false;320 return ENOMEM; 321 321 tmpfs_name_initialize(namep); 322 322 size_t len = strlen(nm); … … 324 324 if (!namep->name) { 325 325 free(namep); 326 return false;326 return ENOMEM; 327 327 } 328 328 strcpy(namep->name, nm); … … 344 344 } 345 345 346 return true;346 return EOK; 347 347 } 348 348
Note:
See TracChangeset
for help on using the changeset viewer.