From: Erwan Velu Date: Tue, 26 Apr 2011 17:39:49 +0000 (+0200) Subject: hdt: dumping boot flag status X-Git-Tag: syslinux-4.06-pre2~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d2403b39ce86b8a98ec144d74c566fc05fce2d53;p=profile%2Fivi%2Fsyslinux.git hdt: dumping boot flag status If the boot flag is set on a partition, let's dump this information. --- diff --git a/com32/hdt/hdt-dump-disks.c b/com32/hdt/hdt-dump-disks.c index ed2aea3..d851bf8 100644 --- a/com32/hdt/hdt-dump-disks.c +++ b/com32/hdt/hdt-dump-disks.c @@ -42,7 +42,7 @@ static void show_partition_information(struct driveinfo *drive_info, char ostype[64]={0}; char *parttype; unsigned int start, end; - bool bootable = false; + char bootable[5] = {0}; int i = nb_partitions_seen; start = partition_offset; @@ -54,7 +54,9 @@ static void show_partition_information(struct driveinfo *drive_info, get_label(ptab->ostype, &parttype); get_bootloader_string(drive_info, ptab, bootloader_name, 9); if (ptab->active_flag == 0x80) - bootable=true; + snprintf(bootable,sizeof(bootable),"%s","true"); + else + snprintf(bootable,sizeof(bootable),"%s","false"); snprintf(ostype,sizeof(ostype),"%02X",ptab->ostype); @@ -65,6 +67,7 @@ static void show_partition_information(struct driveinfo *drive_info, add_as("partition->size",size) add_as("partition->type",parttype) add_as("partition->os_type",ostype) + add_as("partition->boot_flag",bootable) END_OF_APPEND; free(parttype); }