Changeset b235c67 in mainline


Ignore:
Timestamp:
2024-11-15T16:44:25Z (6 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
64eba57
Parents:
733564a
git-author:
Miroslav Cimerman <mc@…> (2024-11-15 16:30:29)
git-committer:
Miroslav Cimerman <mc@…> (2024-11-15 16:44:25)
Message:

hr: use shorthand vol for volume

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/hr/hr.c

    r733564a rb235c67  
    6565
    6666        fibril_mutex_lock(&hr_volumes_lock);
    67         list_foreach(hr_volumes, lvolumes, hr_volume_t, volume) {
    68                 if (volume->svc_id == svc_id) {
     67        list_foreach(hr_volumes, lvolumes, hr_volume_t, vol) {
     68                if (vol->svc_id == svc_id) {
    6969                        fibril_mutex_unlock(&hr_volumes_lock);
    70                         return volume;
     70                        return vol;
    7171                }
    7272        }
     
    8181
    8282        fibril_mutex_lock(&hr_volumes_lock);
    83         list_foreach(hr_volumes, lvolumes, hr_volume_t, volume) {
    84                 if (volume->svc_id == svc_id) {
    85                         hr_fini_devs(volume);
    86                         list_remove(&volume->lvolumes);
    87                         free(volume);
     83        list_foreach(hr_volumes, lvolumes, hr_volume_t, vol) {
     84                if (vol->svc_id == svc_id) {
     85                        hr_fini_devs(vol);
     86                        list_remove(&vol->lvolumes);
     87                        free(vol);
    8888                        fibril_mutex_unlock(&hr_volumes_lock);
    8989                        return EOK;
     
    310310                goto error;
    311311
    312         list_foreach(hr_volumes, lvolumes, hr_volume_t, volume) {
    313                 memcpy(info.extents, volume->extents,
     312        list_foreach(hr_volumes, lvolumes, hr_volume_t, vol) {
     313                memcpy(info.extents, vol->extents,
    314314                    sizeof(hr_extent_t) * HR_MAXDEVS);
    315                 info.svc_id = volume->svc_id;
    316                 info.extent_no = volume->dev_no;
    317                 info.level = volume->level;
     315                info.svc_id = vol->svc_id;
     316                info.extent_no = vol->dev_no;
     317                info.level = vol->level;
    318318                /* print usable number of blocks */
    319                 info.nblocks = volume->data_blkno;
    320                 info.strip_size = volume->strip_size;
    321                 info.bsize = volume->bsize;
    322                 info.status = volume->status;
     319                info.nblocks = vol->data_blkno;
     320                info.strip_size = vol->strip_size;
     321                info.bsize = vol->bsize;
     322                info.status = vol->status;
    323323
    324324                if (!async_data_read_receive(&call, &size)) {
Note: See TracChangeset for help on using the changeset viewer.