Rev 2653 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2653 | Rev 2687 | ||
---|---|---|---|
Line 54... | Line 54... | ||
54 | /** Perform a path lookup. |
54 | /** Perform a path lookup. |
55 | * |
55 | * |
56 | * @param path Path to be resolved; it needn't be an ASCIIZ string. |
56 | * @param path Path to be resolved; it needn't be an ASCIIZ string. |
57 | * @param len Number of path characters pointed by path. |
57 | * @param len Number of path characters pointed by path. |
58 | * @param result Empty node structure where the result will be stored. |
58 | * @param result Empty node structure where the result will be stored. |
- | 59 | * @param size Storage where the size of the node will be stored. Can |
|
- | 60 | * be NULL. |
|
59 | * @param altroot If non-empty, will be used instead of rootfs as the root |
61 | * @param altroot If non-empty, will be used instead of rootfs as the root |
60 | * of the whole VFS tree. |
62 | * of the whole VFS tree. |
61 | * |
63 | * |
62 | * @return EOK on success or an error code from errno.h. |
64 | * @return EOK on success or an error code from errno.h. |
63 | */ |
65 | */ |
64 | int vfs_lookup_internal(char *path, size_t len, vfs_triplet_t *result, |
66 | int vfs_lookup_internal(char *path, size_t len, vfs_triplet_t *result, |
65 | vfs_pair_t *altroot) |
67 | size_t *size, vfs_pair_t *altroot) |
66 | { |
68 | { |
67 | vfs_pair_t *root; |
69 | vfs_pair_t *root; |
68 | 70 | ||
69 | if (!len) |
71 | if (!len) |
70 | return EINVAL; |
72 | return EINVAL; |
Line 163... | Line 165... | ||
163 | 165 | ||
164 | if (rc == EOK) { |
166 | if (rc == EOK) { |
165 | result->fs_handle = (int) IPC_GET_ARG1(answer); |
167 | result->fs_handle = (int) IPC_GET_ARG1(answer); |
166 | result->dev_handle = (int) IPC_GET_ARG2(answer); |
168 | result->dev_handle = (int) IPC_GET_ARG2(answer); |
167 | result->index = (int) IPC_GET_ARG3(answer); |
169 | result->index = (int) IPC_GET_ARG3(answer); |
- | 170 | if (size) |
|
- | 171 | *size = (size_t) IPC_GET_ARG4(answer); |
|
168 | } |
172 | } |
169 | 173 | ||
170 | return rc; |
174 | return rc; |
171 | } |
175 | } |
172 | 176 |