Changes in / [eb87adb:4093b14] in mainline
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
contrib/arch/uspace/srv/vfs/vfs.adl
reb87adb r4093b14 4 4 5 5 /* Mount filesystem */ 6 sysarg_t mount(in sysarg_t device, in sysarg_t flags, in sysarg_t instance, in_copy string point, in_copy string opts, in_copy string fs);6 sysarg_t mount(in sysarg_t device, in sysarg_t flags, in_copy string point, in_copy string opts, in_copy string fs); 7 7 8 8 /* Open file */ … … 56 56 57 57 /* Mount filesystem */ 58 sysarg_t mount(in sysarg_t device, in sysarg_t flags, in sysarg_t instance, in_copy string point, in_copy string opts, ...);58 sysarg_t mount(in sysarg_t device, in sysarg_t flags, in_copy string point, in_copy string opts, ...); 59 59 60 60 /* Open file by node */ -
kernel/arch/ia64/include/asm.h
reb87adb r4093b14 44 44 #define IA64_IOSPACE_ADDRESS 0xE001000000000000ULL 45 45 46 #define IO_SPACE_BOUNDARY ((void *) (64 * 1024))47 48 46 NO_TRACE static inline void pio_write_8(ioport8_t *port, uint8_t v) 49 47 { 50 if (port < (ioport8_t *) IO_SPACE_BOUNDARY) { 51 uintptr_t prt = (uintptr_t) port; 52 53 *((ioport8_t *) (IA64_IOSPACE_ADDRESS + 54 ((prt & 0xfff) | ((prt >> 2) << 12)))) = v; 55 } else { 56 *port = v; 57 } 48 uintptr_t prt = (uintptr_t) port; 49 50 *((ioport8_t *) (IA64_IOSPACE_ADDRESS + 51 ((prt & 0xfff) | ((prt >> 2) << 12)))) = v; 58 52 59 53 asm volatile ( … … 65 59 NO_TRACE static inline void pio_write_16(ioport16_t *port, uint16_t v) 66 60 { 67 if (port < (ioport16_t *) IO_SPACE_BOUNDARY) { 68 uintptr_t prt = (uintptr_t) port; 69 70 *((ioport16_t *) (IA64_IOSPACE_ADDRESS + 71 ((prt & 0xfff) | ((prt >> 2) << 12)))) = v; 72 } else { 73 *port = v; 74 } 61 uintptr_t prt = (uintptr_t) port; 62 63 *((ioport16_t *) (IA64_IOSPACE_ADDRESS + 64 ((prt & 0xfff) | ((prt >> 2) << 12)))) = v; 75 65 76 66 asm volatile ( … … 82 72 NO_TRACE static inline void pio_write_32(ioport32_t *port, uint32_t v) 83 73 { 84 if (port < (ioport32_t *) IO_SPACE_BOUNDARY) { 85 uintptr_t prt = (uintptr_t) port; 86 87 *((ioport32_t *) (IA64_IOSPACE_ADDRESS + 88 ((prt & 0xfff) | ((prt >> 2) << 12)))) = v; 89 } else { 90 *port = v; 91 } 74 uintptr_t prt = (uintptr_t) port; 75 76 *((ioport32_t *) (IA64_IOSPACE_ADDRESS + 77 ((prt & 0xfff) | ((prt >> 2) << 12)))) = v; 92 78 93 79 asm volatile ( … … 99 85 NO_TRACE static inline uint8_t pio_read_8(ioport8_t *port) 100 86 { 101 uint8_t v; 102 103 asm volatile ( 104 "mf\n" 105 ::: "memory" 106 ); 107 108 if (port < (ioport8_t *) IO_SPACE_BOUNDARY) { 109 uintptr_t prt = (uintptr_t) port; 110 111 v = *((ioport8_t *) (IA64_IOSPACE_ADDRESS + 112 ((prt & 0xfff) | ((prt >> 2) << 12)))); 113 } else { 114 v = *port; 115 } 116 117 return v; 87 uintptr_t prt = (uintptr_t) port; 88 89 asm volatile ( 90 "mf\n" 91 ::: "memory" 92 ); 93 94 return *((ioport8_t *) (IA64_IOSPACE_ADDRESS + 95 ((prt & 0xfff) | ((prt >> 2) << 12)))); 118 96 } 119 97 120 98 NO_TRACE static inline uint16_t pio_read_16(ioport16_t *port) 121 99 { 122 uint16_t v; 123 124 asm volatile ( 125 "mf\n" 126 ::: "memory" 127 ); 128 129 if (port < (ioport16_t *) IO_SPACE_BOUNDARY) { 130 uintptr_t prt = (uintptr_t) port; 131 132 v = *((ioport16_t *) (IA64_IOSPACE_ADDRESS + 133 ((prt & 0xfff) | ((prt >> 2) << 12)))); 134 } else { 135 v = *port; 136 } 137 138 return v; 100 uintptr_t prt = (uintptr_t) port; 101 102 asm volatile ( 103 "mf\n" 104 ::: "memory" 105 ); 106 107 return *((ioport16_t *) (IA64_IOSPACE_ADDRESS + 108 ((prt & 0xfff) | ((prt >> 2) << 12)))); 139 109 } 140 110 141 111 NO_TRACE static inline uint32_t pio_read_32(ioport32_t *port) 142 112 { 143 uint32_t v; 144 145 asm volatile ( 146 "mf\n" 147 ::: "memory" 148 ); 149 150 if (port < (ioport32_t *) IO_SPACE_BOUNDARY) { 151 uintptr_t prt = (uintptr_t) port; 152 153 v = *((ioport32_t *) (IA64_IOSPACE_ADDRESS + 154 ((prt & 0xfff) | ((prt >> 2) << 12)))); 155 } else { 156 v = *port; 157 } 158 159 return v; 113 uintptr_t prt = (uintptr_t) port; 114 115 asm volatile ( 116 "mf\n" 117 ::: "memory" 118 ); 119 120 return *((ioport32_t *) (IA64_IOSPACE_ADDRESS + 121 ((prt & 0xfff) | ((prt >> 2) << 12)))); 160 122 } 161 123 -
kernel/generic/src/adt/btree.c
reb87adb r4093b14 38 38 * 39 39 * The B+tree has the following properties: 40 * @li it is a bal anced 3-4-5 tree (i.e. BTREE_M = 5)40 * @li it is a ballanced 3-4-5 tree (i.e. BTREE_M = 5) 41 41 * @li values (i.e. pointers to values) are stored only in leaves 42 42 * @li leaves are linked in a list 43 43 * 44 * Be careful when using these trees. They need to allocate44 * Be carefull when using these trees. They need to allocate 45 45 * and deallocate memory for their index nodes and as such 46 46 * can sleep. … … 146 146 * also makes use of this feature. 147 147 * 148 * @param node B-tree node into w hich the new key is to be inserted.148 * @param node B-tree node into wich the new key is to be inserted. 149 149 * @param key The key to be inserted. 150 150 * @param value Pointer to value to be inserted. … … 270 270 * This feature is used during insert by right rotation. 271 271 * 272 * @param node B-tree node into w hich the new key is to be inserted.272 * @param node B-tree node into wich the new key is to be inserted. 273 273 * @param key The key to be inserted. 274 274 * @param value Pointer to value to be inserted. … … 463 463 if (rnode->keys < BTREE_MAX_KEYS) { 464 464 /* 465 * The rota tion can be done. The right sibling has free space.465 * The rotaion can be done. The right sibling has free space. 466 466 */ 467 467 node_insert_key_and_rsubtree(node, inskey, insvalue, rsubtree); … … 484 484 * the median will be copied there. 485 485 * 486 * @param node B-tree node w hich is going to be split.486 * @param node B-tree node wich is going to be split. 487 487 * @param key The key to be inserted. 488 488 * @param value Pointer to the value to be inserted. … … 562 562 if (node->keys < BTREE_MAX_KEYS) { 563 563 /* 564 * Node con tains enough space, the key can be stored immediately.564 * Node conatins enough space, the key can be stored immediately. 565 565 */ 566 566 node_insert_key_and_rsubtree(node, key, value, rsubtree); … … 806 806 807 807 /* 808 * The key can be immediatel y removed.808 * The key can be immediatelly removed. 809 809 * 810 810 * Note that the right subtree is removed because when -
kernel/generic/src/adt/list.c
reb87adb r4093b14 33 33 /** 34 34 * @file 35 * @brief Functions completing doubly linked circular list implementa tion.35 * @brief Functions completing doubly linked circular list implementaion. 36 36 * 37 37 * This file contains some of the functions implementing doubly linked circular lists. -
uspace/app/bdsh/cmds/modules/mount/mount.c
reb87adb r4093b14 43 43 static struct option const long_options[] = { 44 44 { "help", no_argument, 0, 'h' }, 45 { "instance", required_argument, 0, 'i' },46 45 { 0, 0, 0, 0 } 47 46 }; … … 69 68 const char *dev = ""; 70 69 int rc, c, opt_ind; 71 unsigned int instance = 0;72 bool instance_set = false;73 char **t_argv;74 70 75 71 argc = cli_count_args(argv); 76 72 77 73 for (c = 0, optind = 0, opt_ind = 0; c != -1;) { 78 c = getopt_long(argc, argv, " i:h", long_options, &opt_ind);74 c = getopt_long(argc, argv, "h", long_options, &opt_ind); 79 75 switch (c) { 80 76 case 'h': 81 77 help_cmd_mount(HELP_LONG); 82 78 return CMD_SUCCESS; 83 case 'i':84 instance = (unsigned int) strtol(optarg, NULL, 10);85 instance_set = true;86 break;87 79 } 88 80 } 89 90 if (instance_set) {91 argc -= 2;92 t_argv = &argv[2];93 } else94 t_argv = &argv[0];95 81 96 82 if ((argc < 3) || (argc > 5)) { … … 100 86 } 101 87 if (argc > 3) 102 dev = t_argv[3];88 dev = argv[3]; 103 89 if (argc == 5) 104 mopts = t_argv[4];90 mopts = argv[4]; 105 91 106 rc = mount( t_argv[1], t_argv[2], dev, mopts, 0, instance);92 rc = mount(argv[1], argv[2], dev, mopts, 0); 107 93 if (rc != EOK) { 108 94 printf("Unable to mount %s filesystem to %s on %s (rc=%d)\n", 109 t_argv[1], t_argv[2], t_argv[3], rc);95 argv[1], argv[2], argv[3], rc); 110 96 return CMD_FAILURE; 111 97 } -
uspace/app/init/init.c
reb87adb r4093b14 121 121 122 122 int rc = mount(fstype, ROOT_MOUNT_POINT, ROOT_DEVICE, opts, 123 IPC_FLAG_BLOCKING , 0);123 IPC_FLAG_BLOCKING); 124 124 return mount_report("Root filesystem", ROOT_MOUNT_POINT, fstype, 125 125 ROOT_DEVICE, rc); … … 138 138 { 139 139 int rc = mount(LOCFS_FS_TYPE, LOCFS_MOUNT_POINT, "", "", 140 IPC_FLAG_BLOCKING , 0);140 IPC_FLAG_BLOCKING); 141 141 return mount_report("Location service filesystem", LOCFS_MOUNT_POINT, 142 142 LOCFS_FS_TYPE, NULL, rc); … … 261 261 static bool mount_tmpfs(void) 262 262 { 263 int rc = mount(TMPFS_FS_TYPE, TMPFS_MOUNT_POINT, "", "", 0 , 0);263 int rc = mount(TMPFS_FS_TYPE, TMPFS_MOUNT_POINT, "", "", 0); 264 264 return mount_report("Temporary filesystem", TMPFS_MOUNT_POINT, 265 265 TMPFS_FS_TYPE, NULL, rc); … … 268 268 static bool mount_data(void) 269 269 { 270 int rc = mount(DATA_FS_TYPE, DATA_MOUNT_POINT, DATA_DEVICE, "wtcache", 0 , 0);270 int rc = mount(DATA_FS_TYPE, DATA_MOUNT_POINT, DATA_DEVICE, "wtcache", 0); 271 271 return mount_report("Data filesystem", DATA_MOUNT_POINT, DATA_FS_TYPE, 272 272 DATA_DEVICE, rc); -
uspace/drv/bus/usb/usbhub/usbhub.c
reb87adb r4093b14 130 130 131 131 opResult = ddf_fun_bind(hub_fun); 132 assert(opResult == EOK); 133 opResult = ddf_fun_add_to_category(hub_fun, "hub"); 132 134 assert(opResult == EOK); 133 135 -
uspace/lib/c/arch/ia64/include/ddi.h
reb87adb r4093b14 52 52 static inline void pio_write_8(ioport8_t *port, uint8_t v) 53 53 { 54 if (port < (ioport8_t *) IO_SPACE_BOUNDARY) { 55 uintptr_t prt = (uintptr_t) port; 54 uintptr_t prt = (uintptr_t) port; 56 55 57 *((ioport8_t *)(IA64_IOSPACE_ADDRESS + 58 ((prt & 0xfff) | ((prt >> 2) << 12)))) = v; 59 } else { 60 *port = v; 61 } 56 *((ioport8_t *)(IA64_IOSPACE_ADDRESS + 57 ((prt & 0xfff) | ((prt >> 2) << 12)))) = v; 62 58 63 59 asm volatile ("mf\n" ::: "memory"); … … 66 62 static inline void pio_write_16(ioport16_t *port, uint16_t v) 67 63 { 68 if (port < (ioport16_t *) IO_SPACE_BOUNDARY) { 69 uintptr_t prt = (uintptr_t) port; 64 uintptr_t prt = (uintptr_t) port; 70 65 71 *((ioport16_t *)(IA64_IOSPACE_ADDRESS + 72 ((prt & 0xfff) | ((prt >> 2) << 12)))) = v; 73 } else { 74 *port = v; 75 } 66 *((ioport16_t *)(IA64_IOSPACE_ADDRESS + 67 ((prt & 0xfff) | ((prt >> 2) << 12)))) = v; 76 68 77 69 asm volatile ("mf\n" ::: "memory"); … … 80 72 static inline void pio_write_32(ioport32_t *port, uint32_t v) 81 73 { 82 if (port < (ioport32_t *) IO_SPACE_BOUNDARY) { 83 uintptr_t prt = (uintptr_t) port; 74 uintptr_t prt = (uintptr_t) port; 84 75 85 *((ioport32_t *)(IA64_IOSPACE_ADDRESS + 86 ((prt & 0xfff) | ((prt >> 2) << 12)))) = v; 87 } else { 88 *port = v; 89 } 76 *((ioport32_t *)(IA64_IOSPACE_ADDRESS + 77 ((prt & 0xfff) | ((prt >> 2) << 12)))) = v; 90 78 91 79 asm volatile ("mf\n" ::: "memory"); … … 94 82 static inline uint8_t pio_read_8(ioport8_t *port) 95 83 { 96 uint 8_t v;84 uintptr_t prt = (uintptr_t) port; 97 85 98 86 asm volatile ("mf\n" ::: "memory"); 99 87 100 if (port < (ioport8_t *) IO_SPACE_BOUNDARY) { 101 uintptr_t prt = (uintptr_t) port; 102 103 v = *((ioport8_t *)(IA64_IOSPACE_ADDRESS + 104 ((prt & 0xfff) | ((prt >> 2) << 12)))); 105 } else { 106 v = *port; 107 } 108 109 return v; 88 return *((ioport8_t *)(IA64_IOSPACE_ADDRESS + 89 ((prt & 0xfff) | ((prt >> 2) << 12)))); 110 90 } 111 91 112 92 static inline uint16_t pio_read_16(ioport16_t *port) 113 93 { 114 uint 16_t v;94 uintptr_t prt = (uintptr_t) port; 115 95 116 96 asm volatile ("mf\n" ::: "memory"); 117 97 118 if (port < (ioport16_t *) IO_SPACE_BOUNDARY) { 119 uintptr_t prt = (uintptr_t) port; 120 121 v = *((ioport16_t *)(IA64_IOSPACE_ADDRESS + 122 ((prt & 0xfff) | ((prt >> 2) << 12)))); 123 } else { 124 v = *port; 125 } 126 127 return v; 98 return *((ioport16_t *)(IA64_IOSPACE_ADDRESS + 99 ((prt & 0xfff) | ((prt >> 2) << 12)))); 128 100 } 129 101 130 102 static inline uint32_t pio_read_32(ioport32_t *port) 131 103 { 132 uint 32_t v;104 uintptr_t prt = (uintptr_t) port; 133 105 134 106 asm volatile ("mf\n" ::: "memory"); 135 107 136 if (port < (ioport32_t *) port) { 137 uintptr_t prt = (uintptr_t) port; 138 139 v = *((ioport32_t *)(IA64_IOSPACE_ADDRESS + 140 ((prt & 0xfff) | ((prt >> 2) << 12)))); 141 } else { 142 v = *port; 143 } 144 145 return v; 108 return *((ioport32_t *)(IA64_IOSPACE_ADDRESS + 109 ((prt & 0xfff) | ((prt >> 2) << 12)))); 146 110 } 147 111 -
uspace/lib/c/generic/adt/hash_table.c
reb87adb r4093b14 190 190 } 191 191 192 /** Apply fu nction to all items in hash table.192 /** Apply fucntion to all items in hash table. 193 193 * 194 194 * @param h Hash table. -
uspace/lib/c/generic/adt/list.c
reb87adb r4093b14 33 33 /** 34 34 * @file 35 * @brief Functions completing doubly linked circular list implementa tion.35 * @brief Functions completing doubly linked circular list implementaion. 36 36 * 37 37 * This file contains some of the functions implementing doubly linked circular lists. -
uspace/lib/c/generic/malloc.c
reb87adb r4093b14 873 873 void free(const void *addr) 874 874 { 875 if (addr == NULL)876 return;877 878 875 futex_down(&malloc_futex); 879 876 -
uspace/lib/c/generic/vfs/vfs.c
reb87adb r4093b14 143 143 144 144 int mount(const char *fs_name, const char *mp, const char *fqsn, 145 const char *opts, unsigned int flags , unsigned int instance)145 const char *opts, unsigned int flags) 146 146 { 147 147 int null_id = -1; … … 181 181 182 182 sysarg_t rc_orig; 183 aid_t req = async_send_3(exch, VFS_IN_MOUNT, service_id, flags, 184 instance, NULL); 183 aid_t req = async_send_2(exch, VFS_IN_MOUNT, service_id, flags, NULL); 185 184 sysarg_t rc = async_data_write_start(exch, (void *) mpa, mpa_size); 186 185 if (rc != EOK) { -
uspace/lib/c/include/ipc/vfs.h
reb87adb r4093b14 56 56 /** Unique identifier of the fs. */ 57 57 char name[FS_NAME_MAXLEN + 1]; 58 unsigned int instance;59 58 bool concurrent_read_write; 60 59 bool write_retains_size; -
uspace/lib/c/include/vfs/vfs.h
reb87adb r4093b14 49 49 50 50 extern int mount(const char *, const char *, const char *, const char *, 51 unsigned int , unsigned int);51 unsigned int); 52 52 extern int unmount(const char *); 53 53 -
uspace/srv/devman/main.c
reb87adb r4093b14 490 490 if (rc == EOK) { 491 491 loc_service_add_to_cat(fun->service_id, cat_id); 492 log_msg(LVL_NOTE, "Function `%s' added to category `%s'.",493 fun->pathname, cat_name);494 492 } else { 495 493 log_msg(LVL_ERROR, "Failed adding function `%s' to category " … … 497 495 } 498 496 497 log_msg(LVL_NOTE, "Function `%s' added to category `%s'.", 498 fun->pathname, cat_name); 499 499 500 fibril_rwlock_read_unlock(&device_tree.rwlock); 500 501 fun_del_ref(fun); 501 502 async_answer_0(callid, rc);502 503 async_answer_0(callid, EOK); 503 504 } 504 505 -
uspace/srv/fs/cdfs/cdfs.c
reb87adb r4093b14 52 52 .concurrent_read_write = false, 53 53 .write_retains_size = false, 54 .instance = 0,55 54 }; 56 55 … … 59 58 printf("%s: HelenOS cdfs file system server\n", NAME); 60 59 61 if (argc == 3) {62 if (!str_cmp(argv[1], "--instance"))63 cdfs_vfs_info.instance = strtol(argv[2], NULL, 10);64 else {65 printf(NAME " Unrecognized parameters");66 return -1;67 }68 }69 70 60 if (!cdfs_init()) { 71 61 printf("%s: failed to initialize cdfs\n", NAME); -
uspace/srv/fs/exfat/exfat.c
reb87adb r4093b14 54 54 .name = NAME, 55 55 .concurrent_read_write = false, 56 .write_retains_size = false, 57 .instance = 0, 56 .write_retains_size = false, 58 57 }; 59 58 … … 61 60 { 62 61 printf(NAME ": HelenOS exFAT file system server\n"); 63 64 if (argc == 3) {65 if (!str_cmp(argv[1], "--instance"))66 exfat_vfs_info.instance = strtol(argv[2], NULL, 10);67 else {68 printf(NAME " Unrecognized parameters");69 return -1;70 }71 }72 62 73 63 int rc = exfat_idx_init(); -
uspace/srv/fs/ext2fs/ext2fs.c
reb87adb r4093b14 52 52 vfs_info_t ext2fs_vfs_info = { 53 53 .name = NAME, 54 .instance = 0,55 54 }; 56 55 … … 58 57 { 59 58 printf(NAME ": HelenOS EXT2 file system server\n"); 60 61 if (argc == 3) {62 if (!str_cmp(argv[1], "--instance"))63 ext2fs_vfs_info.instance = strtol(argv[2], NULL, 10);64 else {65 printf(NAME " Unrecognized parameters");66 return -1;67 }68 }69 59 70 60 async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE, -
uspace/srv/fs/fat/fat.c
reb87adb r4093b14 54 54 .name = NAME, 55 55 .concurrent_read_write = false, 56 .write_retains_size = false, 57 .instance = 0, 56 .write_retains_size = false, 58 57 }; 59 58 … … 62 61 printf(NAME ": HelenOS FAT file system server\n"); 63 62 64 if (argc == 3) {65 if (!str_cmp(argv[1], "--instance"))66 fat_vfs_info.instance = strtol(argv[2], NULL, 10);67 else {68 printf(NAME " Unrecognized parameters");69 return -1;70 }71 }72 73 63 int rc = fat_idx_init(); 74 64 if (rc != EOK) -
uspace/srv/fs/locfs/locfs.c
reb87adb r4093b14 55 55 .concurrent_read_write = false, 56 56 .write_retains_size = false, 57 .instance = 0,58 57 }; 59 58 … … 62 61 printf("%s: HelenOS Device Filesystem\n", NAME); 63 62 64 if (argc == 3) {65 if (!str_cmp(argv[1], "--instance"))66 locfs_vfs_info.instance = strtol(argv[2], NULL, 10);67 else {68 printf(NAME " Unrecognized parameters");69 return -1;70 }71 }72 73 74 63 if (!locfs_init()) { 75 64 printf("%s: failed to initialize locfs\n", NAME); -
uspace/srv/fs/mfs/mfs.c
reb87adb r4093b14 39 39 40 40 #include <ipc/services.h> 41 #include <stdlib.h>42 #include <str.h>43 41 #include <ns.h> 44 42 #include <async.h> … … 54 52 .concurrent_read_write = false, 55 53 .write_retains_size = false, 56 .instance = 0,57 54 }; 58 55 … … 62 59 63 60 printf(NAME ": HelenOS Minix file system server\n"); 64 65 if (argc == 3) {66 if (!str_cmp(argv[1], "--instance"))67 mfs_vfs_info.instance = strtol(argv[2], NULL, 10);68 else {69 printf(NAME " Unrecognized parameters");70 rc = -1;71 goto err;72 }73 }74 61 75 62 async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE, -
uspace/srv/fs/tmpfs/tmpfs.c
reb87adb r4093b14 59 59 .concurrent_read_write = false, 60 60 .write_retains_size = false, 61 .instance = 0,62 61 }; 63 62 … … 65 64 { 66 65 printf(NAME ": HelenOS TMPFS file system server\n"); 67 68 if (argc == 3) {69 if (!str_cmp(argv[1], "--instance"))70 tmpfs_vfs_info.instance = strtol(argv[2], NULL, 10);71 else {72 printf(NAME " Unrecognized parameters");73 return -1;74 }75 }76 66 77 67 if (!tmpfs_init()) { -
uspace/srv/vfs/vfs.h
reb87adb r4093b14 171 171 extern void vfs_exchange_release(async_exch_t *); 172 172 173 extern fs_handle_t fs_name_to_handle( unsigned int instance,char *, bool);173 extern fs_handle_t fs_name_to_handle(char *, bool); 174 174 extern vfs_info_t *fs_handle_to_info(fs_handle_t); 175 175 -
uspace/srv/vfs/vfs_ops.c
reb87adb r4093b14 146 146 147 147 rindex = (fs_index_t) IPC_GET_ARG1(answer); 148 rsize = (aoff64_t) MERGE_LOUP32(IPC_GET_ARG2(answer), 149 IPC_GET_ARG3(answer)); 148 rsize = (aoff64_t) MERGE_LOUP32(IPC_GET_ARG2(answer), IPC_GET_ARG3(answer)); 150 149 rlnkcnt = (unsigned) IPC_GET_ARG4(answer); 151 150 … … 277 276 278 277 /* 279 * Instance number is passed as ARG3.280 * /281 unsigned int instance = IPC_GET_ARG3(*request);282 278 * For now, don't make use of ARG3, but it can be used to 279 * carry mount options in the future. 280 */ 281 283 282 /* We want the client to send us the mount point. */ 284 283 char *mp; … … 336 335 fs_handle_t fs_handle; 337 336 recheck: 338 fs_handle = fs_name_to_handle( instance,fs_name, false);337 fs_handle = fs_name_to_handle(fs_name, false); 339 338 if (!fs_handle) { 340 339 if (flags & IPC_FLAG_BLOCKING) { -
uspace/srv/vfs/vfs_register.c
reb87adb r4093b14 154 154 * Check for duplicit registrations. 155 155 */ 156 if (fs_name_to_handle(fs_info->vfs_info.instance, 157 fs_info->vfs_info.name, false)) { 156 if (fs_name_to_handle(fs_info->vfs_info.name, false)) { 158 157 /* 159 158 * We already register a fs like this. … … 298 297 * 299 298 */ 300 fs_handle_t fs_name_to_handle( unsigned int instance,char *name, bool lock)299 fs_handle_t fs_name_to_handle(char *name, bool lock) 301 300 { 302 301 int handle = 0; … … 307 306 list_foreach(fs_list, cur) { 308 307 fs_info_t *fs = list_get_instance(cur, fs_info_t, fs_link); 309 if (str_cmp(fs->vfs_info.name, name) == 0 && 310 instance == fs->vfs_info.instance) { 308 if (str_cmp(fs->vfs_info.name, name) == 0) { 311 309 handle = fs->fs_handle; 312 310 break;
Note:
See TracChangeset
for help on using the changeset viewer.