summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@chromium.org>2019-08-28 22:45:39 (GMT)
committerCommit Bot <commit-bot@chromium.org>2019-08-29 23:21:44 (GMT)
commit7974dc348a044044e79b3d7a3997ef75254b0286 (patch)
tree0634868686cd74be892db7b4828bf8c998f57ca2
parent31bda282648dd662b1f9c7c8cb8c2dfc8ca27585 (diff)
downloadvboot-7974dc348a044044e79b3d7a3997ef75254b0286.tar.gz
cgpt: improve help text
Standardize on the term "blocks" rather than "sectors" as this matches our disk layout configuration files. For cgpt show, split the specific field options out from the -i option. The current text makes it seem like they're always required when using the -i option, and it's not super clear that they only matter when the -i flag is used. BUG=None TEST=CQ passes BRANCH=None Change-Id: Idfd939cfe9501da78e323bc1ce8c1fbf772fbaa9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1773965 Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
-rw-r--r--cgpt/cmd_add.c6
-rw-r--r--cgpt/cmd_boot.c2
-rw-r--r--cgpt/cmd_create.c4
-rw-r--r--cgpt/cmd_edit.c2
-rw-r--r--cgpt/cmd_find.c2
-rw-r--r--cgpt/cmd_legacy.c2
-rw-r--r--cgpt/cmd_prioritize.c2
-rw-r--r--cgpt/cmd_repair.c2
-rw-r--r--cgpt/cmd_show.c31
9 files changed, 28 insertions, 25 deletions
diff --git a/cgpt/cmd_add.c b/cgpt/cmd_add.c
index ef6f729..b229ef1 100644
--- a/cgpt/cmd_add.c
+++ b/cgpt/cmd_add.c
@@ -16,12 +16,12 @@ static void Usage(void)
printf("\nUsage: %s add [OPTIONS] DRIVE\n\n"
"Add, edit, or remove a partition entry.\n\n"
"Options:\n"
- " -D NUM Size (in bytes) of the disk where partitions reside\n"
+ " -D NUM Size (in bytes) of the disk where partitions reside;\n"
" default 0, meaning partitions and GPT structs are\n"
" both on DRIVE\n"
" -i NUM Specify partition (default is next available)\n"
- " -b NUM Beginning sector\n"
- " -s NUM Size in sectors\n"
+ " -b NUM First block (a.k.a. start of partition)\n"
+ " -s NUM Size (in blocks)\n"
" -t GUID Partition Type GUID\n"
" -u GUID Partition Unique ID\n"
" -l LABEL Label\n"
diff --git a/cgpt/cmd_boot.c b/cgpt/cmd_boot.c
index 07cf5b4..a638deb 100644
--- a/cgpt/cmd_boot.c
+++ b/cgpt/cmd_boot.c
@@ -16,7 +16,7 @@ static void Usage(void)
printf("\nUsage: %s boot [OPTIONS] DRIVE\n\n"
"Edit the PMBR sector for legacy BIOSes\n\n"
"Options:\n"
- " -D NUM Size (in bytes) of the disk where partitions reside\n"
+ " -D NUM Size (in bytes) of the disk where partitions reside;\n"
" default 0, meaning partitions and GPT structs are\n"
" both on DRIVE\n"
" -i NUM Set bootable partition\n"
diff --git a/cgpt/cmd_create.c b/cgpt/cmd_create.c
index 22d4956..dfa8a1f 100644
--- a/cgpt/cmd_create.c
+++ b/cgpt/cmd_create.c
@@ -16,10 +16,10 @@ static void Usage(void)
printf("\nUsage: %s create [OPTIONS] DRIVE\n\n"
"Create or reset an empty GPT.\n\n"
"Options:\n"
- " -D NUM Size (in bytes) of the disk where partitions reside\n"
+ " -D NUM Size (in bytes) of the disk where partitions reside;\n"
" default 0, meaning partitions and GPT structs are\n"
" both on DRIVE\n"
- " -z Zero the sectors of the GPT table and entries\n"
+ " -z Zero the blocks of the GPT table and entries\n"
" -p NUM Size (in blocks) of the disk to pad between the\n"
" primary GPT header and its entries, default 0\n"
"\n", progname);
diff --git a/cgpt/cmd_edit.c b/cgpt/cmd_edit.c
index 3daf389..7a4cdf5 100644
--- a/cgpt/cmd_edit.c
+++ b/cgpt/cmd_edit.c
@@ -15,7 +15,7 @@ static void Usage(void)
printf("\nUsage: %s edit [OPTIONS] DRIVE\n\n"
"Edit a drive's parameters.\n\n"
"Options:\n"
- " -D NUM Size (in bytes) of the disk where partitions reside\n"
+ " -D NUM Size (in bytes) of the disk where partitions reside;\n"
" default 0, meaning partitions and GPT structs are\n"
" both on DRIVE\n"
" -u GUID Drive Unique ID\n"
diff --git a/cgpt/cmd_find.c b/cgpt/cmd_find.c
index bf7c395..fe04b09 100644
--- a/cgpt/cmd_find.c
+++ b/cgpt/cmd_find.c
@@ -17,7 +17,7 @@ static void Usage(void)
"Find a partition by its UUID or label. With no specified DRIVE\n"
"it scans all physical drives.\n\n"
"Options:\n"
- " -D NUM Size (in bytes) of the disk where partitions reside\n"
+ " -D NUM Size (in bytes) of the disk where partitions reside;\n"
" default 0, meaning partitions and GPT structs are\n"
" both on DRIVE\n"
" -t GUID Search for Partition Type GUID\n"
diff --git a/cgpt/cmd_legacy.c b/cgpt/cmd_legacy.c
index 5468e8a..dd39848 100644
--- a/cgpt/cmd_legacy.c
+++ b/cgpt/cmd_legacy.c
@@ -16,7 +16,7 @@ static void Usage(void)
printf("\nUsage: %s legacy [OPTIONS] DRIVE\n\n"
"Switch GPT header signature to \"CHROMEOS\".\n\n"
"Options:\n"
- " -D NUM Size (in bytes) of the disk where partitions reside\n"
+ " -D NUM Size (in bytes) of the disk where partitions reside;\n"
" default 0, meaning partitions and GPT structs are\n"
" both on DRIVE\n"
" -e Switch GPT header signature back to \"EFI PART\"\n"
diff --git a/cgpt/cmd_prioritize.c b/cgpt/cmd_prioritize.c
index 92d1deb..afd257f 100644
--- a/cgpt/cmd_prioritize.c
+++ b/cgpt/cmd_prioritize.c
@@ -19,7 +19,7 @@ static void Usage(void)
printf("\nUsage: %s prioritize [OPTIONS] DRIVE\n\n"
"Reorder the priority of all active ChromeOS Kernel partitions.\n\n"
"Options:\n"
- " -D NUM Size (in bytes) of the disk where partitions reside\n"
+ " -D NUM Size (in bytes) of the disk where partitions reside;\n"
" default 0, meaning partitions and GPT structs are\n"
" both on DRIVE\n"
" -P NUM Highest priority to use in the new ordering. The\n"
diff --git a/cgpt/cmd_repair.c b/cgpt/cmd_repair.c
index 18e79ca..7e4012e 100644
--- a/cgpt/cmd_repair.c
+++ b/cgpt/cmd_repair.c
@@ -16,7 +16,7 @@ static void Usage(void)
printf("\nUsage: %s repair [OPTIONS] DRIVE\n\n"
"Repair damaged GPT headers and tables.\n\n"
"Options:\n"
- " -D NUM Size (in bytes) of the disk where partitions reside\n"
+ " -D NUM Size (in bytes) of the disk where partitions reside;\n"
" default 0, meaning partitions and GPT structs are\n"
" both on DRIVE\n"
" -v Verbose\n"
diff --git a/cgpt/cmd_show.c b/cgpt/cmd_show.c
index 4d169f5..ba19315 100644
--- a/cgpt/cmd_show.c
+++ b/cgpt/cmd_show.c
@@ -17,27 +17,30 @@ extern const char* progname;
static void Usage(void)
{
printf("\nUsage: %s show [OPTIONS] DRIVE\n\n"
- "Display the GPT table\n\n"
+ "Display the GPT table.\n\n"
+ "Units are blocks by default.\n\n"
"Options:\n"
- " -D NUM Size (in bytes) of the disk where partitions reside\n"
+ " -D NUM Size (in bytes) of the disk where partitions reside;\n"
" default 0, meaning partitions and GPT structs are\n"
" both on DRIVE\n"
" -n Numeric output only\n"
" -v Verbose output\n"
" -q Quick output\n"
- " -i NUM Show specified partition only - pick one of:\n"
- " -b beginning sector\n"
- " -s partition size\n"
- " -t type guid\n"
- " -u unique guid\n"
- " -l label\n"
- " -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"
+ " -i NUM Show specified partition only\n"
" -d Debug output (including invalid headers)\n"
+ "\n"
+ "When using -i, specific fields may be displayed using one of:\n"
+ " -b first block (a.k.a. start of partition)\n"
+ " -s partition size (in blocks)\n"
+ " -t type guid\n"
+ " -u unique guid\n"
+ " -l label\n"
+ " -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"
"\n", progname);
}