Changeset 4200735 in mainline


Ignore:
Timestamp:
2025-04-01T08:53:17Z (3 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
44da6c8
Parents:
0277ec2
Message:

hr: fix printing extent states with invalid service id

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/device/src/hr.c

    r0277ec2 r4200735  
    228228        for (i = 0; i < vol_info->extent_no; i++) {
    229229                ext = &vol_info->extents[i];
    230                 if (ext->status == HR_EXT_MISSING) {
     230                if (ext->status == HR_EXT_MISSING || ext->status == HR_EXT_NONE) {
    231231                        devname = (char *) "MISSING-devname";
    232232                } else {
    233233                        rc = loc_service_get_name(ext->svc_id, &devname);
    234                         if (rc != EOK)
    235                                 return rc;
     234                        if (rc != EOK) {
     235                                printf("loc_service_get_name() failed, skipping...\n");
     236                                continue;
     237                        }
    236238                }
    237239                if (vol_info->level == HR_LVL_4) {
Note: See TracChangeset for help on using the changeset viewer.