Changeset 16105cba in mainline
- Timestamp:
- 2008-02-17T14:28:20Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e704503
- Parents:
- 2616965d
- Location:
- uspace
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/include/errno.h
r2616965d r16105cba 43 43 #define ENOSPC (-259) 44 44 #define EEXIST (-260) 45 #define ENOTEMPTY (-261) 45 46 46 47 #endif -
uspace/srv/fs/tmpfs/tmpfs_ops.c
r2616965d r16105cba 188 188 static int destroy_component(void *nodeptr) 189 189 { 190 return EPERM; 190 tmpfs_dentry_t *dentry = (tmpfs_dentry_t *)nodeptr; 191 192 if (dentry->child) 193 return ENOTEMPTY; 194 195 if (!dentry->parent) 196 return EBUSY; 197 198 if (dentry->parent->child == dentry) { 199 dentry->parent->child = dentry->sibling; 200 } else { 201 /* TODO: consider doubly linked list for organizing siblings. */ 202 tmpfs_dentry_t *tmp = dentry->parent->child; 203 while (tmp->sibling != dentry) 204 tmp = tmp->sibling; 205 tmp->sibling = dentry->sibling; 206 } 207 208 return EOK; 191 209 } 192 210 … … 314 332 if (lflag & L_DESTROY) { 315 333 int res = destroy_component(dcur); 316 ipc_answer_0(rid, res); 334 unsigned lnkcnt = (res == EOK) ? 0 : TMPFS_GET_LNKCNT(dcur); 335 ipc_answer_5(rid, (ipcarg_t)res, tmpfs_reg.fs_handle, 336 dev_handle, dcur->index, dcur->size, lnkcnt); 317 337 return; 318 338 }
Note:
See TracChangeset
for help on using the changeset viewer.