diff options
author | Shao Miller <shao.miller@yrdsb.edu.on.ca> | 2010-06-28 06:07:04 -0400 |
---|---|---|
committer | Shao Miller <shao.miller@yrdsb.edu.on.ca> | 2010-07-10 01:03:07 -0400 |
commit | 2cb2149a7c579ad8732053bd3391512daf253502 (patch) | |
tree | 75bfc4370c404ff400c02f70de6da93c9fde7079 /com32/modules | |
parent | 7e4a36355a113c181d298d679a552d95302fa58c (diff) | |
download | syslinux-2cb2149a7c579ad8732053bd3391512daf253502.tar.gz |
chain.c32, libcom32: Move gpt_part_dump() as disk_gpt_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.c | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/com32/modules/chain.c b/com32/modules/chain.c index 1134f9db..f69c9bd5 100644 --- a/com32/modules/chain.c +++ b/com32/modules/chain.c @@ -348,31 +348,6 @@ err_alloc: return NULL; } -static void gpt_part_dump(const struct disk_gpt_part_entry *gpt_part) -{ -#ifdef DEBUG - unsigned int i; - char guid_text[37]; - - dprintf("----------------------------------\n" - "GPT part. LBA first __ : 0x%.16llx\n" - "GPT part. LBA last ___ : 0x%.16llx\n" - "GPT part. attribs ____ : 0x%.16llx\n" - "GPT part. name _______ : '", - gpt_part->lba_first, gpt_part->lba_last, gpt_part->attribs); - for (i = 0; i < sizeof(gpt_part->name); i++) { - if (gpt_part->name[i]) - dprintf("%c", gpt_part->name[i]); - } - dprintf("'"); - guid_to_str(guid_text, &gpt_part->type); - dprintf("GPT part. type GUID __ : {%s}\n", guid_text); - guid_to_str(guid_text, &gpt_part->uid); - dprintf("GPT part. unique ID __ : {%s}\n", guid_text); -#endif - (void)gpt_part; -} - /* A GPT header */ struct gpt { char sig[8]; @@ -457,7 +432,9 @@ static struct disk_part_iter *next_gpt_part(struct disk_part_iter *part) part->private.gpt.part_label = gpt_part->name; /* Update our index */ part->index++; - gpt_part_dump(gpt_part); +#ifdef DEBUG + disk_gpt_part_dump(gpt_part); +#endif /* In a GPT scheme, we re-use the iterator */ return part; @@ -1387,7 +1364,9 @@ int main(int argc, char *argv[]) dprintf("GPT handover:\n"); disk_dos_part_dump(record); - gpt_part_dump((struct disk_gpt_part_entry *)(plen + 1)); +#ifdef DEBUG + disk_gpt_part_dump((struct disk_gpt_part_entry *)(plen + 1)); +#endif } else if (cur_part->record) { /* MBR handover protocol */ static struct disk_dos_part_entry handover_record; |