aboutsummaryrefslogtreecommitdiff
path: root/host
diff options
context:
space:
mode:
authorNam T. Nguyen <namnguyen@chromium.org>2014-11-13 19:30:46 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-11-14 22:46:59 +0000
commitab899591808dd3e5f955ab7693b54a83389cd35f (patch)
tree8d12700b5be62ac132fd09e3cb17f6b6cce4b70c /host
parenta524a3a51591618c1395cb9e1238ee72b3f5e767 (diff)
downloadvboot_reference-ab899591808dd3e5f955ab7693b54a83389cd35f.tar.gz
vboot: cgpt: Treat drive_path as the GPT storage
Previously, "cgpt" called out to "flashrom" directly to read and write NOR area. This CL removes that dependency and always treats "drive_path" as the storage of GPT structs. This makes it consistent that whatever device that cgpt reads from or writes to is always the device that stores GPT structs. We only need to pass in the size of the drive that contains the partitions, but we do not need to access to that drive. More information is in the bug. BUG=chromium:432611 BRANCH=none TEST=unittest CQ-DEPEND=CL:228942 Change-Id: Id0139adf70463cec4f2924de8b9a4725dbec822b Reviewed-on: https://chromium-review.googlesource.com/229736 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Queue: Nam Nguyen <namnguyen@chromium.org> Tested-by: Nam Nguyen <namnguyen@chromium.org>
Diffstat (limited to 'host')
-rw-r--r--host/include/cgpt_params.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/host/include/cgpt_params.h b/host/include/cgpt_params.h
index ac437744..e10d15e7 100644
--- a/host/include/cgpt_params.h
+++ b/host/include/cgpt_params.h
@@ -15,6 +15,7 @@ enum {
typedef struct CgptCreateParams {
char *drive_name;
+ uint64_t drive_size;
int zap;
uint64_t size;
uint64_t padding;
@@ -22,6 +23,7 @@ typedef struct CgptCreateParams {
typedef struct CgptAddParams {
char *drive_name;
+ uint64_t drive_size;
uint32_t partition;
uint64_t begin;
uint64_t size;
@@ -44,6 +46,7 @@ typedef struct CgptAddParams {
typedef struct CgptShowParams {
char *drive_name;
+ uint64_t drive_size;
int numeric;
int verbose;
int quick;
@@ -55,11 +58,13 @@ typedef struct CgptShowParams {
typedef struct CgptRepairParams {
char *drive_name;
+ uint64_t drive_size;
int verbose;
} CgptRepairParams;
typedef struct CgptBootParams {
char *drive_name;
+ uint64_t drive_size;
uint32_t partition;
char *bootfile;
int create_pmbr;
@@ -67,6 +72,7 @@ typedef struct CgptBootParams {
typedef struct CgptPrioritizeParams {
char *drive_name;
+ uint64_t drive_size;
uint32_t set_partition;
int set_friends;
int max_priority;
@@ -75,6 +81,7 @@ typedef struct CgptPrioritizeParams {
typedef struct CgptFindParams {
char *drive_name;
+ uint64_t drive_size;
int verbose;
int set_unique;
int set_type;
@@ -94,6 +101,7 @@ typedef struct CgptFindParams {
typedef struct CgptLegacyParams {
char *drive_name;
+ uint64_t drive_size;
int efipart;
} CgptLegacyParams;