blk: Support iteration
authorSimon Glass <sjg@chromium.org>
Mon, 5 Jul 2021 22:32:59 +0000 (16:32 -0600)
committerSimon Glass <sjg@chromium.org>
Wed, 21 Jul 2021 16:27:35 +0000 (10:27 -0600)
commit96f37b092fdbb604e43c313265995d72ff1a82fe
tree45bb72df5da51250ee48c59efe11c9369bb418e2
parent6b165ab2b7b1dc89357afbe86c1977addf5aed3b
blk: Support iteration

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@chromium.org>
drivers/block/blk-uclass.c
include/blk.h
test/dm/blk.c