completion support


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1020 c046a42c-6fe2-441c-8c8c-71466251a162
diff --git a/block.c b/block.c
index e71adda..8946564 100644
--- a/block.c
+++ b/block.c
@@ -470,6 +470,15 @@
     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;