Changeset 2c2e0c6 in mainline for uspace/srv/vfs/vfs_mount.c
- Timestamp:
- 2007-09-28T20:40:56Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- af0ff9b2
- Parents:
- 7313e7a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_mount.c
r7313e7a r2c2e0c6 46 46 #include "vfs.h" 47 47 48 atomic_t rootfs_futex = FUTEX_INITIALIZER; 48 49 vfs_node_t rootfs = { 0 }; 49 50 … … 59 60 }; 60 61 61 return vfs_lookup_internal("/", 1, root, &altroot);62 return vfs_lookup_internal("/", strlen("/"), root, &altroot); 62 63 } 63 64 … … 150 151 */ 151 152 vfs_node_t mp; 153 futex_down(&rootfs_futex); 152 154 if (rootfs.fs_handle) { 153 155 /* … … 160 162 * The lookup failed for some reason. 161 163 */ 164 futex_up(&rootfs_futex); 162 165 free(buf); 163 166 ipc_answer_fast(rid, rc, 0, 0); … … 168 171 * We still don't have the root file system mounted. 169 172 */ 170 if ((size - FS_NAME_MAXLEN == 1) &&173 if ((size - FS_NAME_MAXLEN == strlen("/")) && 171 174 (buf[FS_NAME_MAXLEN] == '/')) { 172 175 /* … … 174 177 */ 175 178 rootfs = mounted_root; 179 futex_up(&rootfs_futex); 176 180 free(buf); 177 181 ipc_answer_fast(rid, EOK, 0, 0); … … 182 186 * being mounted first. 183 187 */ 188 futex_up(&rootfs_futex); 184 189 free(buf); 185 190 ipc_answer_fast(rid, ENOENT, 0, 0); … … 187 192 } 188 193 } 189 194 futex_up(&rootfs_futex); 195 190 196 /* 191 197 * At this point, we have all necessary pieces: file system and device
Note:
See TracChangeset
for help on using the changeset viewer.