summaryrefslogtreecommitdiff
path: root/firmware/lib/cgptlib/include/cgptlib.h
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2012-09-24 17:41:18 -0700
committerGerrit <chrome-bot@google.com>2012-09-26 12:02:24 -0700
commit65d3c277a2098d6149fb79f7881da5d78133ae57 (patch)
tree1201337eb351060e81fa513e2f13937796edec9e /firmware/lib/cgptlib/include/cgptlib.h
parent210c5ef2d9d060bebf5020da886e2cabd6e05d6d (diff)
downloadvboot-65d3c277a2098d6149fb79f7881da5d78133ae57.tar.gz
Make cgpt_add error messages a little more verbose
When the cgpt utility complaints about parameter errors, it is impossible to tell what exactly went wrong. This change consolidates error definitions and adds a function to convert integer error values into text messages. BRANCH=none BUG=none TEST=manual . emerge-link vbooot_reference . copy generated `cgpt' to a Link device . run command with wrong arguments with respect to the existing GPT: localhost var # ./cgpt add -i 3 -b 3985408 -s 1757184 -t rootfs -l ROOT-A /dev/sda ERROR: cgpt add: Starting LBA overlaps ERROR: cgpt add: -i 3 -l ROOT-A -b 3985408 -s 1757184 -t 3CB8E202-3B7E-47DD-8A3C-7FF2A13CFCEC . on the host, in the chroot in src/platform/vboot_reference run $ make && make runtests observe all tests succeed Change-Id: Ibd23ca0430a875f70524adc99e0509b26ae699b2 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/34003 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'firmware/lib/cgptlib/include/cgptlib.h')
-rw-r--r--firmware/lib/cgptlib/include/cgptlib.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/firmware/lib/cgptlib/include/cgptlib.h b/firmware/lib/cgptlib/include/cgptlib.h
index 451ecf0b..b6b27c96 100644
--- a/firmware/lib/cgptlib/include/cgptlib.h
+++ b/firmware/lib/cgptlib/include/cgptlib.h
@@ -16,6 +16,11 @@ enum {
GPT_ERROR_INVALID_SECTOR_SIZE,
GPT_ERROR_INVALID_SECTOR_NUMBER,
GPT_ERROR_INVALID_UPDATE_TYPE,
+ GPT_ERROR_CRC_CORRUPTED,
+ GPT_ERROR_OUT_OF_REGION,
+ GPT_ERROR_START_LBA_OVERLAP,
+ GPT_ERROR_END_LBA_OVERLAP,
+ GPT_ERROR_DUP_GUID,
};
/* Bit masks for GptData.modified field. */