Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Torstein Eide <torsteine@gmail.com>
To: linux-mmc@vger.kernel.org
Cc: Torstein Eide <torsteine+linux@gmail.com>
Subject: [PATCH v2 0/5] mmc-utils: improve lsmmc usability
Date: Fri, 15 May 2026 23:37:42 +0200	[thread overview]
Message-ID: <20260515213747.1452692-1-torsteine+linux@gmail.com> (raw)

This series improves lsmmc in four areas: external manufacturer ID files,
accepting /dev and /sys/block paths for register reads, an mmc list command,
and bash completion for mmc-utils.

A cleanup patch is prepended to refactor CID parsing into shared structs and
helpers used by all three print functions.

Changes since v1 (review by Avri Altman):
- Patch 1 (new): refactor CID parsing into struct sd_cid/mmc_cid and
  parse_sd_cid()/parse_mmc_cid() helpers; used by print_sd_cid,
  print_mmc_cid, and print_list_entry
- Patch 2: get_manufacturer: fix static buffer lifetime, return strdup()
- Patch 2: get_manufacturer: simplify fopen fallback, warn once if ids
  files missing
- Patch 2: replace read_file() with read_file_at(dir, name), remove all
  chdir() calls
- Patch 2: struct config: remove ids_dir field
- Patch 2: print_sd_cid, print_mmc_cid: free() the manufacturer string
- Patch 3: resolve_dev_path: use stack buffer, strip partition suffix,
  validate device type
- Patch 4: month_name: switch to 0-indexed 16-entry array, drop "???" sentinel
- Patch 4: do_list: move struct config outside loop
- Patch 4: do_list: remove redundant access() check
- Patch 5: bash completion: accept more than 9 devices (/dev/mmcblk[0-9]
  replaced with compgen -G + grep regex)

Torstein Eide (5):
  mmc-utils: lsmmc: Refactor CID parsing into shared structs
  mmc-utils: lsmmc: Use external .ids files for manufacturer lookup
  mmc-utils: lsmmc: Accept /dev and /sys/block paths for register reads
  mmc-utils: lsmmc: Add mmc list command
  mmc-utils: Add bash completion

 Makefile           |  11 +-
 completion/mmc     |  62 +++++
 docs/HOWTO.rst     |  77 +++++-
 lsmmc.c            | 594 ++++++++++++++++++++++++++-------------------
 mmc.c              |   6 +-
 mmc_cmds.h         |   1 +
 multimediacard.ids |  16 ++
 sdcard.ids         |  23 ++
 8 files changed, 531 insertions(+), 259 deletions(-)
 create mode 100644 completion/mmc
 create mode 100644 multimediacard.ids
 create mode 100644 sdcard.ids

-- 
2.53.0


             reply	other threads:[~2026-05-15 21:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-15 21:37 Torstein Eide [this message]
2026-05-15 21:37 ` [PATCH v2 1/5] mmc-utils: lsmmc: Refactor CID parsing into shared structs Torstein Eide
2026-05-15 21:37 ` [PATCH v2 2/5] mmc-utils: lsmmc: Use external .ids files for manufacturer lookup Torstein Eide
2026-05-15 21:37 ` [PATCH v2 3/5] mmc-utils: lsmmc: Accept /dev and /sys/block paths for register reads Torstein Eide
2026-05-15 21:37 ` [PATCH v2 4/5] mmc-utils: lsmmc: Add mmc list command Torstein Eide
2026-05-15 21:37 ` [PATCH v2 5/5] mmc-utils: Add bash completion Torstein Eide

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=20260515213747.1452692-1-torsteine+linux@gmail.com \
    --to=torsteine@gmail.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=torsteine+linux@gmail.com \
    /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