vboot: GPT interface cleanup

- Rename drive_sectors to streaming_drive_sectors, to contrast with
  gpt_drive_sectors
- Replace stored_on_device field with flags field for future
  extensibility

BUG=chromium:433433
TEST=make runtests
BRANCH=none

Change-Id: I785a3b735b8eb96f647a334659329db3ee43eb80
Signed-off-by: Dan Ehrenberg <dehrenberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/234283
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
Dan Ehrenberg
2014-12-09 13:42:15 -08:00
committed by chrome-internal-fetch
parent cfe83a827d
commit b3d38f5c62
10 changed files with 130 additions and 123 deletions

View File

@@ -57,10 +57,8 @@ enum {
GPT_UPDATE_ENTRY_BAD = 2,
};
enum {
GPT_STORED_ON_DEVICE = 0, /* The GPT is stored on the same device. */
GPT_STORED_OFF_DEVICE = 1, /* The GPT is stored on another place. */
};
/* If this bit is 1, the GPT is stored in another from the streaming data */
#define GPT_FLAG_EXTERNAL 0x1
/*
* A note about stored_on_device and gpt_drive_sectors:
@@ -88,11 +86,11 @@ typedef struct {
/* Size of a LBA sector, in bytes */
uint32_t sector_bytes;
/* Size of drive (that the partitions are on) in LBA sectors */
uint64_t drive_sectors;
/* Are the GPT structures stored on the same device */
uint8_t stored_on_device;
uint64_t streaming_drive_sectors;
/* Size of the device that holds the GPT structures, 512-byte sectors */
uint64_t gpt_drive_sectors;
/* Flags */
uint32_t flags;
/* Outputs */
/* Which inputs have been modified? GPT_MODIFIED_* */