mmc-utils: do not hide CID manufacturer information

Reading the MID just to convert it to 'Unlisted' is quite unhelpful for
an info command.
Due to the (constantly increasing) amount of valid MIDs it is quite
unlikely to we have it in the database already anyway.

Thus simply always print the manufacturer ID as 0xNN and understand the
manufacturer name as an additional information held in parenthesis.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20230522214818.2038252-3-ejo@pengutronix.de
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Enrico Jorns authored and Ulf Hansson committed 2023-05-24 14:54:22 +02:00
1 parent 78af8638c2
commit 8ac394dd9c
1 file changed
+3 -3
+3 -3
View File
@@ -636,10 +636,10 @@ void print_mmc_cid(struct config *config, char *cid)
printf("\tCRC: 0x%02x\n", crc);
} else {
if (config->mmc_ids[mid])
printf("manufacturer: '%s' 0x%01x\n",
config->mmc_ids[mid], oid);
printf("manufacturer: 0x%02x (%s) oid: 0x%01x\n",
mid, config->mmc_ids[mid], oid);
else
printf("manufacturer: 'Unlisted' 0x%01x\n", oid);
printf("manufacturer: 0x%02x (Unlisted) oid: 0x%01x\n", mid, oid);
printf("product: '%s' %u.%u\n", pnm, prv_major, prv_minor);
printf("serial: 0x%08x\n", psn);