+/*
+ * Map GPT partition types to partition GUIDs.
+ * NB: not all GPT partition types have an equivalent MBR type.
+ */
+static inline bool parse_gpt_parttype(const char *type, struct partinfo *part)
+{
+ if (!strcmp(type, "cros_kernel")) {
+ part->has_guid = true;
+ part->guid = GUID_PARTITION_CHROME_OS_KERNEL;
+ /* Default attributes: bootable kernel. */
+ part->gattr = (1ULL << 48) | /* priority=1 */
+ (1ULL << 56); /* success=1 */
+ return true;
+ }
+ return false;
+}
+