summaryrefslogtreecommitdiff
path: root/cgpt/cgpt_show.c
diff options
context:
space:
mode:
authorBen Chan <benchan@chromium.org>2018-01-31 11:39:14 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-02-06 18:18:35 -0800
commita4a8c02ad5988bd4b6fd85f6e09e9e0e79d18feb (patch)
treea1cc5fb4923c3d5a990fb486debc7cb2fe261f04 /cgpt/cgpt_show.c
parent3585eb3d21da676db3d87e9e0490a0df92d597d2 (diff)
downloadvboot-a4a8c02ad5988bd4b6fd85f6e09e9e0e79d18feb.tar.gz
cgpt: add support for managing GPT platform required partition bit
Bit 0 in the GPT partition attributes is defined to indicate whether a partition is required by the platform. This CL adds the support for managing this bit to cgpt. BUG=b:70807006 BRANCH=None TEST=Run unit tests. Change-Id: Iaf87c828438b3df6730de502ae420fcf4c61277b Reviewed-on: https://chromium-review.googlesource.com/902196 Commit-Ready: Ben Chan <benchan@chromium.org> Tested-by: Ben Chan <benchan@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org>
Diffstat (limited to 'cgpt/cgpt_show.c')
-rw-r--r--cgpt/cgpt_show.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cgpt/cgpt_show.c b/cgpt/cgpt_show.c
index cd4a6136..60d73ec7 100644
--- a/cgpt/cgpt_show.c
+++ b/cgpt/cgpt_show.c
@@ -136,9 +136,9 @@ void EntryDetails(GptEntry *entry, uint32_t index, int raw) {
priority, tries, successful);
}
- if (entry->attrs.fields.system) {
+ if (entry->attrs.fields.required) {
clen += snprintf(contents + clen, sizeof(contents) - clen,
- "system=%d ", entry->attrs.fields.system);
+ "required=%d ", entry->attrs.fields.required);
require(clen < sizeof(contents));
}
@@ -230,6 +230,9 @@ static int GptShow(struct drive *drive, CgptShowParams *params) {
case 'P':
printf("%d\n", GetPriority(drive, ANY_VALID, index));
break;
+ case 'R':
+ printf("%d\n", GetRequired(drive, ANY_VALID, index));
+ break;
case 'B':
printf("%d\n", GetLegacyBoot(drive, ANY_VALID, index));
break;