aboutsummaryrefslogtreecommitdiffstats
path: root/com32/modules
diff options
context:
space:
mode:
authorShao Miller <shao.miller@yrdsb.edu.on.ca>2010-06-28 06:21:21 -0400
committerShao Miller <shao.miller@yrdsb.edu.on.ca>2010-07-10 01:03:07 -0400
commitf4f4e91cc75d6f5e9b127c34b7f1829c36518455 (patch)
treeb4ed1c7241de05d04df861830cda4227a125ad13 /com32/modules
parenta3e5be2ccec7c50e771f4807c8d3156c2c97330c (diff)
downloadsyslinux-f4f4e91cc75d6f5e9b127c34b7f1829c36518455.tar.gz
syslinux-f4f4e91cc75d6f5e9b127c34b7f1829c36518455.tar.xz
syslinux-f4f4e91cc75d6f5e9b127c34b7f1829c36518455.zip
chain.c32, libcom32: Move gpt_dump() as disk_gpt_header_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.c39
1 files changed, 2 insertions, 37 deletions
diff --git a/com32/modules/chain.c b/com32/modules/chain.c
index a703ea09..5078ed3c 100644
--- a/com32/modules/chain.c
+++ b/com32/modules/chain.c
@@ -348,41 +348,6 @@ err_alloc:
return NULL;
}
-#if DEBUG
-static void gpt_dump(const struct disk_gpt_header *gpt)
-{
- char guid_text[37];
-
- printf("GPT sig ______________ : '%8.8s'\n"
- "GPT major revision ___ : 0x%.4x\n"
- "GPT minor revision ___ : 0x%.4x\n"
- "GPT header size ______ : 0x%.8x\n"
- "GPT header checksum __ : 0x%.8x\n"
- "GPT reserved _________ : '%4.4s'\n"
- "GPT LBA current ______ : 0x%.16llx\n"
- "GPT LBA alternative __ : 0x%.16llx\n"
- "GPT LBA first usable _ : 0x%.16llx\n"
- "GPT LBA last usable __ : 0x%.16llx\n"
- "GPT LBA part. table __ : 0x%.16llx\n"
- "GPT partition count __ : 0x%.8x\n"
- "GPT partition size ___ : 0x%.8x\n"
- "GPT part. table chksum : 0x%.8x\n",
- gpt->sig,
- gpt->rev.fields.major,
- gpt->rev.fields.minor,
- gpt->hdr_size,
- gpt->chksum,
- gpt->reserved1,
- gpt->lba_cur,
- gpt->lba_alt,
- gpt->lba_first_usable,
- gpt->lba_last_usable,
- gpt->lba_table, gpt->part_count, gpt->part_size, gpt->table_chksum);
- guid_to_str(guid_text, &gpt->disk_guid);
- printf("GPT disk GUID ________ : {%s}\n", guid_text);
-}
-#endif
-
static struct disk_part_iter *next_gpt_part(struct disk_part_iter *part)
{
const struct disk_gpt_part_entry *gpt_part = NULL;
@@ -459,7 +424,7 @@ static struct disk_part_iter *get_first_partition(struct disk_part_iter *part)
/* TODO: Check checksum. Possibly try alternative GPT */
#if DEBUG
puts("Looks like a GPT disk.");
- gpt_dump(gpt_candidate);
+ disk_gpt_header_dump(gpt_candidate);
#endif
/* TODO: Check table checksum (maybe) */
/* Note relevant GPT details */
@@ -525,7 +490,7 @@ static int find_by_guid(const struct guid *gpt_guid,
continue;
}
#if DEBUG
- gpt_dump(header);
+ disk_gpt_header_dump(header);
#endif
is_me = !memcmp(&header->disk_guid, &gpt_guid, sizeof(*gpt_guid));
free(header);