aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErwan Velu <erwanaliasr1@gmail.com>2011-04-26 19:39:49 +0200
committerErwan Velu <erwanaliasr1@gmail.com>2011-04-26 19:39:49 +0200
commitd2403b39ce86b8a98ec144d74c566fc05fce2d53 (patch)
tree79decc8c0d8865f1394813a3256afcf40c6bc4f3
parentb7291d4a98bafb4ac3f1a2ff7df37037f91ad04e (diff)
downloadsyslinux-d2403b39ce86b8a98ec144d74c566fc05fce2d53.tar.gz
syslinux-d2403b39ce86b8a98ec144d74c566fc05fce2d53.tar.xz
syslinux-d2403b39ce86b8a98ec144d74c566fc05fce2d53.zip
hdt: dumping boot flag status
If the boot flag is set on a partition, let's dump this information.
-rw-r--r--com32/hdt/hdt-dump-disks.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/com32/hdt/hdt-dump-disks.c b/com32/hdt/hdt-dump-disks.c
index ed2aea36..d851bf87 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);
}