summaryrefslogtreecommitdiff
path: root/cgpt/cmd_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/cmd_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/cmd_show.c')
-rw-r--r--cgpt/cmd_show.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cgpt/cmd_show.c b/cgpt/cmd_show.c
index b9e64818..6f31b3b5 100644
--- a/cgpt/cmd_show.c
+++ b/cgpt/cmd_show.c
@@ -32,6 +32,7 @@ static void Usage(void)
" -S Successful flag\n"
" -T Tries flag\n"
" -P Priority flag\n"
+ " -R Required flag\n"
" -B Legacy Boot flag\n"
" -A raw 16-bit attribute value (bits 48-63)\n"
" -d Debug output (including invalid headers)\n"
@@ -47,7 +48,7 @@ int cmd_show(int argc, char *argv[]) {
char *e = 0;
opterr = 0; // quiet, you
- while ((c=getopt(argc, argv, ":hnvqi:bstulSTPBAdD:")) != -1)
+ while ((c=getopt(argc, argv, ":hnvqi:bstulSTPRBAdD:")) != -1)
{
switch (c)
{
@@ -76,6 +77,7 @@ int cmd_show(int argc, char *argv[]) {
case 'S':
case 'T':
case 'P':
+ case 'R':
case 'B':
case 'A':
params.single_item = c;