Module Name:    src
Committed By:   kre
Date:           Thu Jun  9 17:43:36 UTC 2016

Modified Files:
        src/sbin/gpt: show.c

Log Message:
Make "gpt show" add an "(active)" annotation to the PMBR output line
when it has been marked active for legacy (non UEFI) booting.
This was (kind of obviously) intended by the previous commit, but...


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sbin/gpt/show.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/gpt/show.c
diff -u src/sbin/gpt/show.c:1.37 src/sbin/gpt/show.c:1.38
--- src/sbin/gpt/show.c:1.37	Thu Jun  9 15:12:54 2016
+++ src/sbin/gpt/show.c	Thu Jun  9 17:43:36 2016
@@ -33,9 +33,10 @@
 __FBSDID("$FreeBSD: src/sbin/gpt/show.c,v 1.14 2006/06/22 22:22:32 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: show.c,v 1.37 2016/06/09 15:12:54 christos Exp $");
+__RCSID("$NetBSD: show.c,v 1.38 2016/06/09 17:43:36 kre Exp $");
 #endif
 
+#include <sys/bootblock.h>
 #include <sys/types.h>
 
 #include <err.h>
@@ -45,6 +46,7 @@ __RCSID("$NetBSD: show.c,v 1.37 2016/06/
 #include <string.h>
 #include <unistd.h>
 
+
 #include "map.h"
 #include "gpt.h"
 #include "gpt_private.h"
@@ -144,6 +146,10 @@ print_part_type(int map_type, int flags,
 		break;
 	case MAP_TYPE_PMBR:
 		printf("PMBR");
+		mbr = map_data;
+		if (mbr->mbr_part[0].part_typ == MBR_PTYPE_PMBR &&
+		    mbr->mbr_part[0].part_flag == 0x80)
+			    printf(" (active)");
 		break;
 	default:
 		printf("Unknown %#x", map_type);

Reply via email to