@@ -1392,7 +1392,6 @@ int do_read_extcsd(int nargs, char **argv)
__u32 regl;
int fd, ret;
char *device;
- char lbuf[10];
const char *str;
if (nargs != 2) {
@@ -1834,9 +1833,7 @@ int do_read_extcsd(int nargs, char **argv)
}
if (ext_csd_rev >= 7) {
- memset(lbuf, 0, sizeof(lbuf));
- strncpy(lbuf, (char*)&ext_csd[EXT_CSD_FIRMWARE_VERSION], 8);
- printf("eMMC Firmware Version: %s\n", lbuf);
+ printf("eMMC Firmware Version: %.8s\n", (char*)&ext_csd[EXT_CSD_FIRMWARE_VERSION]);
printf("eMMC Life Time Estimation A [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A]: 0x%02x\n",
ext_csd[EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A]);
printf("eMMC Life Time Estimation B [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B]: 0x%02x\n",