Changes in uspace/lib/fdisk/src/fdisk.c [d1582b50:25444332] in mainline
- File:
-
- 1 edited
-
uspace/lib/fdisk/src/fdisk.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/fdisk/src/fdisk.c
rd1582b50 r25444332 1 1 /* 2 * Copyright (c) 20 15Jiri Svoboda2 * Copyright (c) 2026 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 673 673 info->fstype = part->fstype; 674 674 info->pkind = part->pkind; 675 info->index = part->index; 675 676 info->label = part->label; 676 677 info->svc_id = part->svc_id; … … 810 811 } 811 812 813 /** Destroy partition. 814 * 815 * @param part Partition 816 * @return EOK on success or error code 817 */ 812 818 errno_t fdisk_part_destroy(fdisk_part_t *part) 813 819 { 814 820 errno_t rc; 821 822 rc = vol_part_eject(part->dev->fdisk->vol, part->svc_id, vef_none); 823 if (rc != EOK) 824 return EIO; 815 825 816 826 rc = vbd_part_delete(part->dev->fdisk->vbd, part->part_id); … … 1022 1032 1023 1033 if (pspec->pkind != lpk_logical) { 1024 rc = fdisk_part_get_free_idx(dev, &index); 1025 if (rc != EOK) 1026 return EIO; 1034 if (pspec->index == 0) { 1035 /* allocate first free index */ 1036 rc = fdisk_part_get_free_idx(dev, &index); 1037 if (rc != EOK) 1038 return EIO; 1039 } else { 1040 /* user-specified index */ 1041 index = pspec->index; 1042 } 1027 1043 } else { 1028 1044 index = 0;
Note:
See TracChangeset
for help on using the changeset viewer.
