Changeset 12a56fa in mainline
- Timestamp:
- 2007-09-28T14:44:23Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 90e6025
- Parents:
- 84b86dcb
- Location:
- uspace/srv/vfs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs.h
r84b86dcb r12a56fa 150 150 extern int fs_name_to_handle(char *name, bool lock); 151 151 152 extern int vfs_lookup_internal(char *path, size_t len, vfs_node_t *result); 152 extern int vfs_lookup_internal(char *path, size_t len, vfs_node_t *result, 153 vfs_node_t *altroot); 153 154 154 155 extern void vfs_register(ipc_callid_t, ipc_call_t *); -
uspace/srv/vfs/vfs_lookup.c
r84b86dcb r12a56fa 52 52 uint8_t *plb = NULL; 53 53 54 int vfs_lookup_internal(char *path, size_t len, vfs_node_t *result) 54 /** Perform a path lookup. 55 * 56 * @param path Path to be resolved; it needn't be an ASCIIZ string. 57 * @param len Number of path characters pointed by path. 58 * @param result Empty node structure where the result will be stored. 59 * @param altroot If non-empty, will be used instead of rootfs as the root 60 * of the whole VFS tree. 61 * 62 * @return EOK on success or an error code from errno.h. 63 */ 64 int vfs_lookup_internal(char *path, size_t len, vfs_node_t *result, 65 vfs_node_t *altroot) 55 66 { 67 vfs_node_t *root; 68 56 69 if (!len) 57 70 return EINVAL; 58 71 59 if (!rootfs) 72 if (altroot) 73 root = altroot; 74 else 75 root = rootfs; 76 77 if (!root) 60 78 return ENOENT; 61 79 … … 126 144 127 145 ipc_call_t answer; 128 int phone = vfs_grab_phone(root fs->fs_handle);146 int phone = vfs_grab_phone(root->fs_handle); 129 147 aid_t req = async_send_3(phone, VFS_LOOKUP, (ipcarg_t) first, 130 (ipcarg_t) last, (ipcarg_t) root fs->dev_handle, &answer);148 (ipcarg_t) last, (ipcarg_t) root->dev_handle, &answer); 131 149 vfs_release_phone(phone); 132 150 … … 136 154 futex_down(&plb_futex); 137 155 list_remove(&entry.plb_link); 156 /* 157 * Erasing the path from PLB will come handy for debugging purposes. 158 */ 159 memset(&plb[first], 0, cnt1); 160 memset(plb, 0, cnt2); 138 161 futex_up(&plb_futex); 139 162 -
uspace/srv/vfs/vfs_register.c
r84b86dcb r12a56fa 290 290 ipc_answer_fast(rid, EINVAL, 0, 0); 291 291 return; 292 293 292 } 294 293
Note:
See TracChangeset
for help on using the changeset viewer.