Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/gpt Make "gpt show" add an "(active)" annotation to the...



details:   https://anonhg.NetBSD.org/src/rev/be0ed3ba8c70
branches:  trunk
changeset: 345814:be0ed3ba8c70
user:      kre <kre%NetBSD.org@localhost>
date:      Thu Jun 09 17:43:36 2016 +0000

description:
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...

diffstat:

 sbin/gpt/show.c |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (34 lines):

diff -r b4748c45150b -r be0ed3ba8c70 sbin/gpt/show.c
--- a/sbin/gpt/show.c   Thu Jun 09 16:48:14 2016 +0000
+++ b/sbin/gpt/show.c   Thu Jun 09 17:43:36 2016 +0000
@@ -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 @@
 #include <string.h>
 #include <unistd.h>
 
+
 #include "map.h"
 #include "gpt.h"
 #include "gpt_private.h"
@@ -144,6 +146,10 @@
                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);



Home | Main Index | Thread Index | Old Index