mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-31 10:26:10 +01:00 
			
		
		
		
	bootstd: cros: store partition type in an efi_guid_t
The scan_part() function uses a struct uuid to store the little-endian partition type GUID, but this structure should be used only to contain a big-endian UUID. Use an efi_guid_t instead. Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
		
				
					committed by
					
						 Simon Glass
						Simon Glass
					
				
			
			
				
	
			
			
			
						parent
						
							0318126236
						
					
				
				
					commit
					c85a05a5d8
				
			| @@ -147,7 +147,7 @@ static int scan_part(struct udevice *blk, int partnum, | |||||||
| { | { | ||||||
| 	struct blk_desc *desc = dev_get_uclass_plat(blk); | 	struct blk_desc *desc = dev_get_uclass_plat(blk); | ||||||
| 	struct vb2_keyblock *hdr; | 	struct vb2_keyblock *hdr; | ||||||
| 	struct uuid type; | 	efi_guid_t type; | ||||||
| 	ulong num_blks; | 	ulong num_blks; | ||||||
| 	int ret; | 	int ret; | ||||||
|  |  | ||||||
| @@ -160,7 +160,7 @@ static int scan_part(struct udevice *blk, int partnum, | |||||||
|  |  | ||||||
| 	/* Check for kernel partition type */ | 	/* Check for kernel partition type */ | ||||||
| 	log_debug("part %x: type=%s\n", partnum, info->type_guid); | 	log_debug("part %x: type=%s\n", partnum, info->type_guid); | ||||||
| 	if (uuid_str_to_bin(info->type_guid, (u8 *)&type, UUID_STR_FORMAT_GUID)) | 	if (uuid_str_to_bin(info->type_guid, type.b, UUID_STR_FORMAT_GUID)) | ||||||
| 		return log_msg_ret("typ", -EINVAL); | 		return log_msg_ret("typ", -EINVAL); | ||||||
|  |  | ||||||
| 	if (memcmp(&cros_kern_type, &type, sizeof(type))) | 	if (memcmp(&cros_kern_type, &type, sizeof(type))) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user