From 32fd6dead10a8255fea27f6e5ce9ba92d8716008 Mon Sep 17 00:00:00 2001 From: Albert Chaulk Date: Thu, 25 Jul 2013 11:32:57 -0700 Subject: Add labels to MTD partitions. Add labels to MTD partitions and clean up some of the show code, adding more info on the MTD prints and eliminating duplicated code. BRANCH=none TEST=make runtests & manual cgpt add -l "label"; cgpt show to verify labels BUG=none Change-Id: I59736128f394c2aca937a3a0bb5fc5d42b0149a9 Reviewed-on: https://gerrit.chromium.org/gerrit/63367 Reviewed-by: Bill Richardson Commit-Queue: Albert Chaulk Tested-by: Albert Chaulk --- firmware/lib/cgptlib/include/mtdlib.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'firmware') diff --git a/firmware/lib/cgptlib/include/mtdlib.h b/firmware/lib/cgptlib/include/mtdlib.h index 0c87822a..fd749aca 100644 --- a/firmware/lib/cgptlib/include/mtdlib.h +++ b/firmware/lib/cgptlib/include/mtdlib.h @@ -66,6 +66,11 @@ typedef struct { uint64_t starting_offset; uint64_t ending_offset; uint32_t flags; + + /* 28 characters is a balance between GPT parity and size constraints, at + * current sizes this table occupies 10% of the FTS data store. + */ + char label[28]; } __attribute__((packed)) MtdDiskPartition; typedef struct { @@ -81,9 +86,9 @@ typedef struct { MtdDiskPartition partitions[MTD_MAX_PARTITIONS]; } __attribute__((packed)) MtdDiskLayout; -#define MTD_DRIVE_V1_SIZE (32 + 16*20) +#define MTD_DRIVE_V1_SIZE (32 + 16*48) -#define MTDENTRY_EXPECTED_SIZE (20) +#define MTDENTRY_EXPECTED_SIZE (48) #define MTDLAYOUT_EXPECTED_SIZE (32 + 16 * MTDENTRY_EXPECTED_SIZE) -- cgit v1.2.1