Changeset e950803 in mainline
- Timestamp:
- 2011-02-03T20:20:01Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bfe43d5
- Parents:
- bd81386 (diff), b366a1bc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/block/libblock.c
rbd81386 re950803 294 294 295 295 /* Allow 1:1 or small-to-large block size translation */ 296 if (cache->lblock_size % devcon->pblock_size != 0) 296 if (cache->lblock_size % devcon->pblock_size != 0) { 297 free(cache); 297 298 return ENOTSUP; 299 } 298 300 299 301 cache->blocks_cluster = cache->lblock_size / devcon->pblock_size; … … 436 438 if (!b->data) { 437 439 free(b); 440 b = NULL; 438 441 goto recycle; 439 442 } … … 563 566 assert(devcon); 564 567 assert(devcon->cache); 568 assert(block->refcnt >= 1); 565 569 566 570 cache = devcon->cache; … … 622 626 unsigned long key = block->lba; 623 627 hash_table_remove(&cache->block_hash, &key, 1); 628 free(block->data); 624 629 free(block); 625 free(block->data);626 630 cache->blocks_cached--; 627 631 fibril_mutex_unlock(&cache->lock); -
uspace/lib/c/generic/async.c
rbd81386 re950803 294 294 } 295 295 296 /** Connection hash table removal callback function.297 *298 * This function is called whenever a connection is removed from the connection299 * hash table.300 *301 * @param item Connection hash table item being removed.302 *303 */304 296 static void conn_remove(link_t *item) 305 297 { 306 free(hash_table_get_instance(item, connection_t, link));307 298 } 308 299 … … 647 638 ipc_answer_0(FIBRIL_connection->close_callid, EOK); 648 639 640 free(FIBRIL_connection); 649 641 return 0; 650 642 } -
uspace/srv/devman/devman.c
rbd81386 re950803 1063 1063 if (info != NULL) { 1064 1064 memset(info, 0, sizeof(dev_class_info_t)); 1065 li st_initialize(&info->dev_classes);1066 li st_initialize(&info->devmap_link);1067 li st_initialize(&info->link);1065 link_initialize(&info->dev_classes); 1066 link_initialize(&info->devmap_link); 1067 link_initialize(&info->link); 1068 1068 } 1069 1069 -
uspace/srv/devmap/devmap.c
rbd81386 re950803 423 423 */ 424 424 list_initialize(&driver->devices); 425 list_initialize(&(driver->drivers)); 425 426 link_initialize(&driver->drivers); 426 427 427 428 fibril_mutex_lock(&drivers_list_mutex); … … 538 539 } 539 540 540 li st_initialize(&(device->devices));541 li st_initialize(&(device->driver_devices));541 link_initialize(&device->devices); 542 link_initialize(&device->driver_devices); 542 543 543 544 /* Check that device is not already registered */ … … 942 943 } 943 944 944 li st_initialize(&(device->devices));945 li st_initialize(&(device->driver_devices));945 link_initialize(&device->devices); 946 link_initialize(&device->driver_devices); 946 947 947 948 /* Get unique device handle */ -
uspace/srv/fs/devfs/devfs_ops.c
rbd81386 re950803 130 130 { 131 131 devfs_node_t *node = (devfs_node_t *) pfn->data; 132 int ret; 132 133 133 134 if (node->handle == 0) { … … 145 146 146 147 if (str_cmp(devs[pos].name, component) == 0) { 148 ret = devfs_node_get_internal(rfn, DEV_HANDLE_NAMESPACE, devs[pos].handle); 147 149 free(devs); 148 return devfs_node_get_internal(rfn, DEV_HANDLE_NAMESPACE, devs[pos].handle);150 return ret; 149 151 } 150 152 } … … 162 164 for (pos = 0; pos < count; pos++) { 163 165 if (str_cmp(devs[pos].name, component) == 0) { 166 ret = devfs_node_get_internal(rfn, DEV_HANDLE_DEVICE, devs[pos].handle); 164 167 free(devs); 165 return devfs_node_get_internal(rfn, DEV_HANDLE_DEVICE, devs[pos].handle);168 return ret; 166 169 } 167 170 } … … 184 187 for (pos = 0; pos < count; pos++) { 185 188 if (str_cmp(devs[pos].name, component) == 0) { 189 ret = devfs_node_get_internal(rfn, DEV_HANDLE_DEVICE, devs[pos].handle); 186 190 free(devs); 187 return devfs_node_get_internal(rfn, DEV_HANDLE_DEVICE, devs[pos].handle);191 return ret; 188 192 } 189 193 }
Note:
See TracChangeset
for help on using the changeset viewer.