aboutsummaryrefslogtreecommitdiffstats
path: root/com32/modules
diff options
context:
space:
mode:
authorShao Miller <shao.miller@yrdsb.edu.on.ca>2010-06-28 02:54:36 -0400
committerShao Miller <shao.miller@yrdsb.edu.on.ca>2010-07-10 01:03:06 -0400
commit8cee41716005ff8495349241de3eeb33ae7b53a0 (patch)
treeb2d0e462659fea883b589e07759b1758b50e6d0c /com32/modules
parent9ed2367f8fb0f48d31f2953b8e85287259c08a18 (diff)
downloadsyslinux-8cee41716005ff8495349241de3eeb33ae7b53a0.tar.gz
syslinux-8cee41716005ff8495349241de3eeb33ae7b53a0.tar.xz
syslinux-8cee41716005ff8495349241de3eeb33ae7b53a0.zip
chain.c32, libcom32: Move mbr_part_dump() as disk_dos_part_dump()
Moving portions of chain.c32 into libcom32. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Diffstat (limited to 'com32/modules')
-rw-r--r--com32/modules/chain.c41
1 files changed, 4 insertions, 37 deletions
diff --git a/com32/modules/chain.c b/com32/modules/chain.c
index fd5cb66a..04b15603 100644
--- a/com32/modules/chain.c
+++ b/com32/modules/chain.c
@@ -147,39 +147,6 @@ static inline void error(const char *msg)
static struct disk_info diskinfo;
-static void mbr_part_dump(const struct disk_dos_part_entry *part)
-{
- (void)part;
- dprintf("Partition status _____ : 0x%.2x\n"
- "Partition CHS start\n"
- " Cylinder ___________ : 0x%.4x (%u)\n"
- " Head _______________ : 0x%.2x (%u)\n"
- " Sector _____________ : 0x%.2x (%u)\n"
- "Partition type _______ : 0x%.2x\n"
- "Partition CHS end\n"
- " Cylinder ___________ : 0x%.4x (%u)\n"
- " Head _______________ : 0x%.2x (%u)\n"
- " Sector _____________ : 0x%.2x (%u)\n"
- "Partition LBA start __ : 0x%.8x (%u)\n"
- "Partition LBA count __ : 0x%.8x (%u)\n"
- "-------------------------------\n",
- part->active_flag,
- chs_cylinder(part->start),
- chs_cylinder(part->start),
- chs_head(part->start),
- chs_head(part->start),
- chs_sector(part->start),
- chs_sector(part->start),
- part->ostype,
- chs_cylinder(part->end),
- chs_cylinder(part->end),
- chs_head(part->end),
- chs_head(part->end),
- chs_sector(part->end),
- chs_sector(part->end),
- part->start_lba, part->start_lba, part->length, part->length);
-}
-
/* A DOS MBR */
struct mbr {
char code[440];
@@ -296,7 +263,7 @@ static struct disk_part_iter *next_ebr_part(struct disk_part_iter *part)
}
ebr_table = ((const struct mbr *)part->block)->table;
dprintf("next_ebr_part:\n");
- mbr_part_dump(ebr_table);
+ disk_dos_part_dump(ebr_table);
/*
* Sanity check entry: must not extend outside the
@@ -373,7 +340,7 @@ static struct disk_part_iter *next_mbr_part(struct disk_part_iter *part)
return next_ebr_part(ebr_part);
}
dprintf("next_mbr_part:\n");
- mbr_part_dump(table + part->private.mbr_index);
+ disk_dos_part_dump(table + part->private.mbr_index);
/* Update parameters to reflect this new partition. Re-use iterator */
part->lba_data = table[part->private.mbr_index].start_lba;
@@ -1550,7 +1517,7 @@ int main(int argc, char *argv[])
regs.esi.w[0] = 0x7be;
dprintf("GPT handover:\n");
- mbr_part_dump(record);
+ disk_dos_part_dump(record);
gpt_part_dump((struct gpt_part *)(plen + 1));
} else if (cur_part->record) {
/* MBR handover protocol */
@@ -1566,7 +1533,7 @@ int main(int argc, char *argv[])
regs.esi.w[0] = 0x7be;
dprintf("MBR handover:\n");
- mbr_part_dump(&handover_record);
+ disk_dos_part_dump(&handover_record);
}
}