Port MTD structures to use 64-bit byte offsets instead of sectors.

As per the discussion on issue 221745 we will be using 64-bit byte offsets
for the MTD partition table and converting to/from sectors internally in cgpt.
Existing interfaces do not change, eg sizes are still reported in sectors, only
the on-disk representation is affected.

BRANCH=none
BUG=chromium:221745
TEST=unit tests pass

Change-Id: Id312d42783acfdabe6eb8aea11dcbd298e00a100
Reviewed-on: https://gerrit.chromium.org/gerrit/60919
Commit-Queue: Albert Chaulk <achaulk@chromium.org>
Reviewed-by: Albert Chaulk <achaulk@chromium.org>
Tested-by: Albert Chaulk <achaulk@chromium.org>
diff --git a/cgpt/cgpt_create.c b/cgpt/cgpt_create.c
index 0b116b2..e7cbadf 100644
--- a/cgpt/cgpt_create.c
+++ b/cgpt/cgpt_create.c
@@ -60,8 +60,8 @@
     // Prep basic parameters
     memcpy(h->signature, MTD_DRIVE_SIGNATURE, sizeof(h->signature));
     h->size = sizeof(*h);
-    h->first_lba = 0;
-    h->last_lba = drive->mtd.drive_sectors - 1;
+    h->first_offset = 0;
+    h->last_offset = (drive->mtd.drive_sectors * drive->mtd.sector_bytes) - 1;
     h->crc32 = MtdHeaderCrc(h);
   }