Changeset 0013b9ce in mainline for uspace/srv/fs/tmpfs
- Timestamp:
- 2008-11-23T12:27:15Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7782030
- Parents:
- f714576
- Location:
- uspace/srv/fs/tmpfs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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.