[syslinux:master] hdt: dumping boot flag status

syslinux-bot for Erwan Velu erwanaliasr1 at gmail.com
Thu Dec 22 13:18:06 PST 2011


Commit-ID:  d2403b39ce86b8a98ec144d74c566fc05fce2d53
Gitweb:     http://www.syslinux.org/commit/d2403b39ce86b8a98ec144d74c566fc05fce2d53
Author:     Erwan Velu <erwanaliasr1 at gmail.com>
AuthorDate: Tue, 26 Apr 2011 19:39:49 +0200
Committer:  Erwan Velu <erwanaliasr1 at gmail.com>
CommitDate: Tue, 26 Apr 2011 19:39:49 +0200

hdt: dumping boot flag status

If the boot flag is set on a partition, let's dump this information.

---
 com32/hdt/hdt-dump-disks.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

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);
 }


More information about the Syslinux-commits mailing list