[PATCH 21/22] blk: Support iteration

Simon Glass sjg at chromium.org
Sat Jul 17 22:39:07 CEST 2021


It is useful to be able to iterate over block devices. Typically there
are fixed and removable devices. For security reasons it is sometimes
useful to ignore removable devices since they are under user control.

Add iterators which support selecting the block-device type.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 drivers/block/blk-uclass.c | 49 +++++++++++++++++++++++++++++++++
 include/blk.h              | 56 ++++++++++++++++++++++++++++++++++++++
 test/dm/blk.c              | 55 +++++++++++++++++++++++++++++++++++++
 3 files changed, 160 insertions(+)

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list