Changeset adc8a63 in mainline
- Timestamp:
- 2008-03-05T19:48:54Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3ca7059
- Parents:
- 5fec355
- Location:
- uspace/srv/fs/tmpfs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/tmpfs/tmpfs.h
r5fec355 radc8a63 55 55 TMPFS_DIRECTORY 56 56 } type; 57 unsigned lnkcnt; /**< Link count. */ 57 58 size_t size; /**< File size if type is TMPFS_FILE. */ 58 59 void *data; /**< File content's if type is TMPFS_FILE. */ -
uspace/srv/fs/tmpfs/tmpfs_ops.c
r5fec355 radc8a63 87 87 static unsigned tmpfs_lnkcnt_get(void *nodep) 88 88 { 89 return 1;89 return ((tmpfs_dentry_t *) nodep)->lnkcnt; 90 90 } 91 91 … … 176 176 dentry->name = NULL; 177 177 dentry->type = TMPFS_NONE; 178 dentry->lnkcnt = 0; 178 179 dentry->size = 0; 179 180 dentry->data = NULL; … … 234 235 if (!name) 235 236 return false; 237 238 childp->lnkcnt++; 239 236 240 strcpy(name, nm); 237 241 childp->name = name; … … 276 280 dentry->name = NULL; 277 281 282 dentry->lnkcnt--; 283 278 284 return EOK; 279 285 } … … 283 289 tmpfs_dentry_t *dentry = (tmpfs_dentry_t *) nodep; 284 290 291 assert(!dentry->lnkcnt); 285 292 assert(!dentry->child); 286 293 assert(!dentry->sibling);
Note:
See TracChangeset
for help on using the changeset viewer.