Changes in uspace/srv/fs/fat/fat_idx.c [15f3c3f:ebddd71] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_idx.c
r15f3c3f rebddd71 116 116 #define UPH_BUCKETS (1 << UPH_BUCKETS_LOG) 117 117 118 #define UPH_ DH_KEY 0118 #define UPH_SID_KEY 0 119 119 #define UPH_PFC_KEY 1 120 120 #define UPH_PDI_KEY 2 … … 122 122 static hash_index_t pos_hash(unsigned long key[]) 123 123 { 124 service_id_t service_id = (service_id_t)key[UPH_ DH_KEY];124 service_id_t service_id = (service_id_t)key[UPH_SID_KEY]; 125 125 fat_cluster_t pfc = (fat_cluster_t)key[UPH_PFC_KEY]; 126 126 unsigned pdi = (unsigned)key[UPH_PDI_KEY]; … … 150 150 static int pos_compare(unsigned long key[], hash_count_t keys, link_t *item) 151 151 { 152 service_id_t service_id = (service_id_t)key[UPH_ DH_KEY];152 service_id_t service_id = (service_id_t)key[UPH_SID_KEY]; 153 153 fat_cluster_t pfc; 154 154 unsigned pdi; … … 190 190 #define UIH_BUCKETS (1 << UIH_BUCKETS_LOG) 191 191 192 #define UIH_ DH_KEY 0192 #define UIH_SID_KEY 0 193 193 #define UIH_INDEX_KEY 1 194 194 195 195 static hash_index_t idx_hash(unsigned long key[]) 196 196 { 197 service_id_t service_id = (service_id_t)key[UIH_ DH_KEY];197 service_id_t service_id = (service_id_t)key[UIH_SID_KEY]; 198 198 fs_index_t index = (fs_index_t)key[UIH_INDEX_KEY]; 199 199 … … 209 209 static int idx_compare(unsigned long key[], hash_count_t keys, link_t *item) 210 210 { 211 service_id_t service_id = (service_id_t)key[UIH_ DH_KEY];211 service_id_t service_id = (service_id_t)key[UIH_SID_KEY]; 212 212 fs_index_t index; 213 213 fat_idx_t *fidx = list_get_instance(item, fat_idx_t, uih_link); … … 402 402 403 403 unsigned long ikey[] = { 404 [UIH_ DH_KEY] = service_id,404 [UIH_SID_KEY] = service_id, 405 405 [UIH_INDEX_KEY] = fidx->index, 406 406 }; … … 420 420 link_t *l; 421 421 unsigned long pkey[] = { 422 [UPH_ DH_KEY] = service_id,422 [UPH_SID_KEY] = service_id, 423 423 [UPH_PFC_KEY] = pfc, 424 424 [UPH_PDI_KEY] = pdi, … … 439 439 440 440 unsigned long ikey[] = { 441 [UIH_ DH_KEY] = service_id,441 [UIH_SID_KEY] = service_id, 442 442 [UIH_INDEX_KEY] = fidx->index, 443 443 }; … … 458 458 { 459 459 unsigned long pkey[] = { 460 [UPH_ DH_KEY] = idx->service_id,460 [UPH_SID_KEY] = idx->service_id, 461 461 [UPH_PFC_KEY] = idx->pfc, 462 462 [UPH_PDI_KEY] = idx->pdi, … … 471 471 { 472 472 unsigned long pkey[] = { 473 [UPH_ DH_KEY] = idx->service_id,473 [UPH_SID_KEY] = idx->service_id, 474 474 [UPH_PFC_KEY] = idx->pfc, 475 475 [UPH_PDI_KEY] = idx->pdi, … … 487 487 link_t *l; 488 488 unsigned long ikey[] = { 489 [UIH_ DH_KEY] = service_id,489 [UIH_SID_KEY] = service_id, 490 490 [UIH_INDEX_KEY] = index, 491 491 }; … … 509 509 { 510 510 unsigned long ikey[] = { 511 [UIH_ DH_KEY] = idx->service_id,511 [UIH_SID_KEY] = idx->service_id, 512 512 [UIH_INDEX_KEY] = idx->index, 513 513 }; … … 571 571 { 572 572 unsigned long ikey[] = { 573 [UIH_ DH_KEY] = service_id573 [UIH_SID_KEY] = service_id 574 574 }; 575 575 unsigned long pkey[] = { 576 [UPH_ DH_KEY] = service_id576 [UPH_SID_KEY] = service_id 577 577 }; 578 578
Note:
See TracChangeset
for help on using the changeset viewer.