Re: [PATCH v2] partitions/efi: Fix partition name parsing in GUID partition entry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> index db2fef7dfc47..51287a8a3bea 100644
> --- a/block/partitions/efi.c
> +++ b/block/partitions/efi.c
> @@ -715,7 +715,7 @@ int efi_partition(struct parsed_partitions *state)
>  				ARRAY_SIZE(ptes[i].partition_name));
>  		info->volname[label_max] = 0;
>  		while (label_count < label_max) {
> -			u8 c = ptes[i].partition_name[label_count] & 0xff;
> +			u8 c = le16_to_cpu(ptes[i].partition_name[label_count]) & 0xff;
>  			if (c && !isprint(c))
>  				c = '!';
>
This adds an overly long line.  Please add a an efi_char_from_cpu or
similarly named helper to encapsulate this logic.

Otherwise the change looks good.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux