Changeset e1ed6ec0 in mainline


Ignore:
Timestamp:
2025-05-09T14:35:49Z (4 weeks ago)
Author:
Miroslav Cimerman <mc@…>
Children:
7e68d61
Parents:
52e40513
Message:

hr: auto assembly: detect bogus label type

File:
1 edited

Legend:

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

    r52e40513 re1ed6ec0  
    657657                        goto error;
    658658
    659                 if (disk_info.ltype == lt_none) {
    660                         rc = hr_add_svc_linked_to_list(list, disk_svcs[i],
    661                             false, NULL);
    662                         if (rc != EOK)
    663                                 goto error;
    664                 } else {
     659                if (disk_info.ltype != lt_none) {
    665660                        size_t part_count;
    666661                        service_id_t *part_ids = NULL;
     
    688683
    689684                        free(part_ids);
     685
     686                        /*
     687                         * vbd can detect some bogus label type, but
     688                         * no partitions. In that case we handle the
     689                         * svc_id as a label-less disk.
     690                         *
     691                         * This can happen when creating an exfat fs
     692                         * in FreeBSD for example.
     693                         */
     694                        if (part_count == 0)
     695                                disk_info.ltype = lt_none;
     696                }
     697
     698                if (disk_info.ltype == lt_none) {
     699                        rc = hr_add_svc_linked_to_list(list, disk_svcs[i],
     700                            false, NULL);
     701                        if (rc != EOK)
     702                                goto error;
    690703                }
    691704        }
Note: See TracChangeset for help on using the changeset viewer.