Changeset 4a2a6b8b in mainline for uspace/srv/bd/hr/util.c
- Timestamp:
- 2024-09-06T22:09:33Z (11 months ago)
- Children:
- 57c61b0
- Parents:
- a19d7fc4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/hr/util.c
ra19d7fc4 r4a2a6b8b 159 159 if (vol->level == hr_l_1) { 160 160 vol->nblocks = total_blocks / vol->dev_no; 161 } else if (vol->level == hr_l_0 ) {161 } else if (vol->level == hr_l_0 || vol->level == hr_l_4) { 162 162 vol->nblocks = total_blocks; 163 163 } else { … … 172 172 } 173 173 174 errno_t hr_c alc_ba(hr_volume_t *vol, size_t cnt, uint64_t *ba)174 errno_t hr_check_ba_range(hr_volume_t *vol, size_t cnt, uint64_t ba) 175 175 { 176 if ( *ba + cnt > vol->data_blkno)176 if (ba + cnt > vol->data_blkno) 177 177 return ERANGE; 178 return EOK; 179 } 178 180 181 void hr_add_ba_offset(hr_volume_t *vol, uint64_t *ba) 182 { 179 183 *ba = *ba + vol->data_offset; 180 return EOK;181 184 } 182 185
Note:
See TracChangeset
for help on using the changeset viewer.