aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-05 19:42:15 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-05 19:42:15 +0000
commitcb5745c52905b014f658b489655584173a8e17d9 (patch)
tree2b33bf9774c7bc7736a5cd6862f8deffd75272e3 /block.c
parent295b492cfa65f4cfbe65ad35ac77b3b2a7c9aa2e (diff)
block: Improve bdrv_iterate (Jan Kiszka)
Make bdrv_iterate more useful by passing the BlockDriverState to the iterator instead of the device name. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10_0@6695 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block.c')
-rw-r--r--block.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block.c b/block.c
index 892c47ad81..6bbc389ff0 100644
--- a/block.c
+++ b/block.c
@@ -1011,12 +1011,12 @@ BlockDriverState *bdrv_find(const char *name)
return NULL;
}
-void bdrv_iterate(void (*it)(void *opaque, const char *name), void *opaque)
+void bdrv_iterate(void (*it)(void *opaque, BlockDriverState *bs), void *opaque)
{
BlockDriverState *bs;
for (bs = bdrv_first; bs != NULL; bs = bs->next) {
- it(opaque, bs->device_name);
+ it(opaque, bs);
}
}