aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Soltys <soltys@ziu.info>2013-02-14 16:51:45 +0100
committerMichal Soltys <soltys@ziu.info>2013-02-14 16:53:04 +0100
commite807b5167d65b5c76acd4f3073832405d01fda31 (patch)
tree9d02372d4b90ae3553e607a0ce39760a1d4a7c07
parent4f46f2e8713dddfc73d4a5e229201302254b988c (diff)
downloadsyslinux-e807b5167d65b5c76acd4f3073832405d01fda31.tar.gz
syslinux-e807b5167d65b5c76acd4f3073832405d01fda31.tar.xz
syslinux-e807b5167d65b5c76acd4f3073832405d01fda31.zip
com32/chain: remove redundant rawindex
'index0' provides the same "raw" info, complementing standard 'index'. Signed-off-by: Michal Soltys <soltys@ziu.info>
-rw-r--r--com32/chain/mangle.c4
-rw-r--r--com32/chain/partiter.c2
-rw-r--r--com32/chain/partiter.h5
3 files changed, 4 insertions, 7 deletions
diff --git a/com32/chain/mangle.c b/com32/chain/mangle.c
index 7fe77eed..136f3bc7 100644
--- a/com32/chain/mangle.c
+++ b/com32/chain/mangle.c
@@ -544,7 +544,7 @@ int manglepe_hide(struct part_iter *miter)
return -1;
while (!pi_next(iter) && !werr) {
- ridx = iter->rawindex;
+ ridx = iter->index0 + 1;
if (!(opt.hide & 2) && ridx > 4)
break; /* skip when we're constrained to pri only */
@@ -614,7 +614,7 @@ int manglepe_fixchs(struct part_iter *miter)
return -1;
while (!pi_next(iter) && !werr) {
- ridx = iter->rawindex;
+ ridx = iter->index0 + 1;
dp = (struct disk_dos_part_entry *)iter->record;
wb |= mpe_setchs(&iter->di, dp, iter->start_lba);
diff --git a/com32/chain/partiter.c b/com32/chain/partiter.c
index 23cbf903..25810ebf 100644
--- a/com32/chain/partiter.c
+++ b/com32/chain/partiter.c
@@ -462,7 +462,6 @@ static int pi_dos_next(struct part_iter *iter)
iter->index = -1;
else
iter->index = iter->index0 - iter->dos.skipcnt + 1;
- iter->rawindex = iter->index0 + 1;
iter->start_lba = start_lba;
iter->length = dos_part->length;
iter->record = (char *)dos_part;
@@ -500,7 +499,6 @@ static int pi_gpt_next(struct part_iter *iter)
}
/* gpt_part is guaranteed to be valid here */
iter->index = iter->index0 + 1;
- iter->rawindex = iter->index0 + 1;
iter->start_lba = gpt_part->lba_first;
iter->length = gpt_part->lba_last - gpt_part->lba_first + 1;
iter->record = (char *)gpt_part;
diff --git a/com32/chain/partiter.h b/com32/chain/partiter.h
index 821d4481..10f18824 100644
--- a/com32/chain/partiter.h
+++ b/com32/chain/partiter.h
@@ -65,9 +65,8 @@ struct part_iter {
uint64_t start_lba;
uint64_t length;
int index0; /* including holes, from -1 (disk, then parts from 0) */
- int rawindex; /* including holes, from 0 (disk, then parts from 1) */
- int index; /* excluding holes, from 0 (disk) (-1) means hole, if PIF_STEPALL is set */
- int flags; /* flags, see #defines above */
+ int index; /* excluding holes, from 0 (disk, then parts from 1), -1 means hole, if PIF_STEPALL is set */
+ int flags; /* flags, see #defines above */
int status; /* current status, see enums above */
struct disk_info di;
union {