{
int wb = 0, werr = 0;
struct part_iter *iter = NULL;
- struct disk_dos_part_entry *dp;
int ridx;
if (!(opt.hide & HIDE_ON))
if (!(opt.hide & HIDE_EXT) && ridx > 3)
break; /* skip when we're constrained to pri only */
- dp = (struct disk_dos_part_entry *)iter->record;
- if (dp->ostype)
+ if (iter->index != -1)
wb |= fliphide(iter, miter);
/*
}
if (!dp[0].ostype)
- iter->dos.skipcnt++;
+ iter->dos.logskipcnt++;
if (dp[0].ostype || (iter->flags & PIF_STEPALL)) {
*lba = iter->dos.cebr_lba + dp[0].start_lba;
* non-PIF_STEPALL iterators
*/
- if (iter->index0 >= 4 && !dos_part->ostype)
+ if (!dos_part->ostype)
iter->index = -1;
else
- iter->index = iter->index0 - iter->dos.skipcnt + 1;
+ iter->index = iter->index0 + 1 - iter->dos.logskipcnt;
iter->start_lba = start_lba;
iter->length = dos_part->length;
iter->record = (char *)dos_part;
struct disk_info di;
union {
struct {
- uint32_t disk_sig; /* 32bit disk signature as stored in MBR */
+ uint32_t disk_sig; /* 32bit disk signature as stored in MBR */
- uint32_t bebr_lba; /* absolute lba of base extended partition */
- uint32_t bebr_siz; /* size of base extended partition */
+ uint32_t bebr_lba; /* absolute lba of base extended partition */
+ uint32_t bebr_siz; /* size of base extended partition */
- uint32_t cebr_lba; /* absolute lba of curr ext. partition */
- uint32_t nebr_lba; /* absolute lba of next ext. partition */
- uint32_t nebr_siz; /* size of next ext. partition */
+ uint32_t cebr_lba; /* absolute lba of curr ext. partition */
+ uint32_t nebr_lba; /* absolute lba of next ext. partition */
+ uint32_t nebr_siz; /* size of next ext. partition */
- int bebr_index0; /* index of (0-3) of base ext. part., -1 if not present in MBR */
- int skipcnt; /* how many logical holes were skipped */
+ int bebr_index0; /* index of (0-3) of base ext. part., -1 if not present in MBR */
+ int logskipcnt; /* how many logical holes were skipped */
} dos;
struct {
struct guid disk_guid;