Index: src/platform/vboot_reference/utility/cgpt/cgpt.h |
diff --git a/src/platform/vboot_reference/utility/cgpt/cgpt.h b/src/platform/vboot_reference/utility/cgpt/cgpt.h |
index 9e5800c15bd7cb5d0ca541206e1de198309625b5..3bc1f82fd028b58aff1205d00e4c3e42cea7dde3 100644 |
--- a/src/platform/vboot_reference/utility/cgpt/cgpt.h |
+++ b/src/platform/vboot_reference/utility/cgpt/cgpt.h |
@@ -51,13 +51,15 @@ struct option_details { |
* i.e. help, to indicate the option is present. */ |
int AssignTrue(const char *argument, void *pointer, void *integer); |
+/* Special validator. Copy string to 'parsed' with max 'valid_range' bytes. */ |
+int CopyString(const char *argument, void *max_len, void *dst); |
+ |
+/* Validator function. Returns 1 if 'argument' is between 'max' and 'min' |
+ * in 'valid_range'. */ |
struct number_range { |
int max; |
int min; |
}; |
- |
-/* Validator function. Returns 1 if 'argument' is between 'max' and 'min' |
- * in 'valid_range'. */ |
int InNumberRange(const char *argument, void *valid_range, void *parsed); |
void ShowOptions(const struct option *opts, |
@@ -97,7 +99,7 @@ int OpenDriveInLastArgument(const int argc, |
* '\0'). |
*/ |
#define GUID_STRLEN 37 |
-void StrToGuid(const char *str, Guid *guid); |
+int StrToGuid(const char *str, Guid *guid); |
void GuidToStr(const Guid *guid, char *str); |
/* Convert UTF16 string to UTF8. Rewritten from gpt utility. |
@@ -113,6 +115,11 @@ void UTF16ToUTF8(const uint16_t *utf16, uint8_t *utf8); |
*/ |
void UTF8ToUTF16(const uint8_t *utf8, uint16_t *utf16); |
+/* Helper functions for supported GPT types. */ |
+int ResolveType(const Guid *type, char *buf); |
+int SupportedType(const char *name, Guid *type); |
+void PrintTypes(void); |
+ |
/* Describes the drive storing the GPT. */ |
struct drive { |
int inited; /* indicated if this structure is valid */ |
@@ -140,7 +147,9 @@ int CheckValid(const struct drive *drive); |
/* Function declarations for commands. |
* The return value of these functions is passed to main()'s exit value. */ |
+int CgptAdm(int argc, char *argv[]); |
int CgptAttribute(int argc, char *argv[]); |
+int CgptDev(int argc, char *argv[]); |
int CgptRepair(int argc, char *argv[]); |
int CgptShow(int argc, char *argv[]); |