aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'block.c')
-rw-r--r--block.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/block.c b/block.c
index e71adda..8946564 100644
--- a/block.c
+++ b/block.c
@@ -470,6 +470,15 @@ BlockDriverState *bdrv_find(const char *name)
return NULL;
}
+void bdrv_iterate(void (*it)(void *opaque, const char *name), void *opaque)
+{
+ BlockDriverState *bs;
+
+ for (bs = bdrv_first; bs != NULL; bs = bs->next) {
+ it(opaque, bs->device_name);
+ }
+}
+
void bdrv_info(void)
{
BlockDriverState *bs;