mmc-utils: improve lsmmc usability
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest5 patches 10 repliesIn review
- v14 patches 10 repliesSuperseded
Changes in v2 from the cover letter
- 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)
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | mmc-utils: lsmmc: Refactor CID parsing into shared structslsmmc.c | +184 | 4 replies | |
| 2/5 | mmc-utils: lsmmc: Use external .ids files for manufacturer lookupMakefile lsmmc.c multimediacard.ids +1 more | +116 | 1 reply | |
| 3/5 | mmc-utils: lsmmc: Accept /dev and /sys/block paths for register readsdocs/ lsmmc.c | +110 | 1 reply | |
| 4/5 | mmc-utils: lsmmc: Add mmc list commanddocs/ lsmmc.c mmc.c +1 more | +51 | 3 replies | |
| 5/5 | mmc-utils: Add bash completionMakefile completion/ docs/ | +72 | 0 replies |
Reviews trailers per patch
3 of 5 patches have a Reviewed-by or Acked-by.
| Patch | Avri Altman |
|---|---|
| 1/5 | R-b |
| 2/5 | R-b |
| 3/5 | R-b |
| 4/5 | |
| 5/5 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/5] mmc-utils: improve lsmmc usability
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
Signature · 1 line
2.53.0