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...
This commit is contained in:
parent
89194609b9
commit
c2246a3f2c
@ -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/09 15:12:54 christos Exp $");
|
||||
#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, void *map_data, off_t map_start)
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user