linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Enrico Jorns <ejo@pengutronix.de>
To: linux-mmc@vger.kernel.org
Cc: Avri Altman <avri.altman@wdc.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	ejo@pengutronix.de
Subject: [PATCH 3/3] mmc-utils: do not hide CID manufacturer information
Date: Mon, 22 May 2023 23:48:18 +0200	[thread overview]
Message-ID: <20230522214818.2038252-3-ejo@pengutronix.de> (raw)
In-Reply-To: <20230522214818.2038252-1-ejo@pengutronix.de>

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>
---
 lsmmc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lsmmc.c b/lsmmc.c
index cea43af..54c3167 100644
--- a/lsmmc.c
+++ b/lsmmc.c
@@ -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);
-- 
2.39.2


  parent reply	other threads:[~2023-05-22 21:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-22 21:48 [PATCH 1/3] mmc-utils: add SanDisk to manufacturer database Enrico Jorns
2023-05-22 21:48 ` [PATCH 2/3] mmc-utils: fix printing OID for mmc in non-verbose mode Enrico Jorns
2023-05-24  6:45   ` Avri Altman
2023-05-24 15:15   ` Ulf Hansson
2023-05-22 21:48 ` Enrico Jorns [this message]
2023-05-24  6:48   ` [PATCH 3/3] mmc-utils: do not hide CID manufacturer information Avri Altman
2023-05-24 15:15   ` Ulf Hansson
2023-05-24  6:41 ` [PATCH 1/3] mmc-utils: add SanDisk to manufacturer database Avri Altman
2023-05-24 15:15 ` Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230522214818.2038252-3-ejo@pengutronix.de \
    --to=ejo@pengutronix.de \
    --cc=avri.altman@wdc.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).