RE: [PATCH 2/7] mmc-utils: treat FIRMWARE_VERSION as binary field instead of string

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

 



> +++ b/mmc_cmds.c
> @@ -1758,8 +1758,15 @@ int do_read_extcsd(int nargs, char **argv)
>  	}
> 
>  	if (ext_csd_rev >= 7) {
> -		printf("eMMC Firmware Version: %s\n",
> -			(char*)&ext_csd[EXT_CSD_FIRMWARE_VERSION]);
> +		printf("Firmware Version:
> 0x%02x%02x%02x%02x%02x%02x%02x%02x\n",
> +			ext_csd[EXT_CSD_FIRMWARE_VERSION_7],
> +			ext_csd[EXT_CSD_FIRMWARE_VERSION_6],
> +			ext_csd[EXT_CSD_FIRMWARE_VERSION_5],
> +			ext_csd[EXT_CSD_FIRMWARE_VERSION_4],
> +			ext_csd[EXT_CSD_FIRMWARE_VERSION_3],
> +			ext_csd[EXT_CSD_FIRMWARE_VERSION_2],
> +			ext_csd[EXT_CSD_FIRMWARE_VERSION_1],
> +			ext_csd[EXT_CSD_FIRMWARE_VERSION_0]);
ExtCSD[261:254] is an ASCII string, just add a terminating null.

Thanks,
Avri





[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux