projects
/
qemu
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66a3cc7
)
unlink the bs from bdrv-list upon bdrv_delete(bs)
author
aurel32
<aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 8 Apr 2008 19:51:21 +0000
(19:51 +0000)
committer
aurel32
<aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 8 Apr 2008 19:51:21 +0000
(19:51 +0000)
(Uri Lublin)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4179
c046a42c
-6fe2-441c-8c8c-
71466251a162
block.c
patch
|
blob
|
history
diff --git
a/block.c
b/block.c
index
0730954
..
bd647a6
100644
(file)
--- a/
block.c
+++ b/
block.c
@@
-452,7
+452,14
@@
void bdrv_close(BlockDriverState *bs)
void bdrv_delete(BlockDriverState *bs)
{
- /* XXX: remove the driver list */
+ BlockDriverState **pbs;
+
+ pbs = &bdrv_first;
+ while (*pbs != bs && *pbs != NULL)
+ pbs = &(*pbs)->next;
+ if (*pbs == bs)
+ *pbs = bs->next;
+
bdrv_close(bs);
qemu_free(bs);
}