Changeset b5c95da5 in mainline for uspace/srv/bd/hr/raid0.c


Ignore:
Timestamp:
2025-06-09T22:40:41Z (7 days ago)
Author:
Miroslav Cimerman <mc@…>
Children:
177f6ff
Parents:
9ee9c60b
Message:

hr: raid*_{create,init}(): replace asserts with EINVAL

File:
1 edited

Legend:

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

    r9ee9c60b rb5c95da5  
    8383        HR_DEBUG("%s()", __func__);
    8484
    85         assert(new_volume->level == HR_LVL_0);
     85        if (new_volume->level != HR_LVL_0)
     86                return EINVAL;
    8687
    8788        if (new_volume->extent_no < 2) {
     
    111112        HR_DEBUG("%s()", __func__);
    112113
    113         assert(vol->level == HR_LVL_0);
     114        if (vol->level != HR_LVL_0)
     115                return EINVAL;
    114116
    115117        uint64_t total_blkno = vol->truncated_blkno * vol->extent_no;
Note: See TracChangeset for help on using the changeset viewer.