[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 10/13] block: Clean up bdrv_snapshots()
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PATCH v3 10/13] block: Clean up bdrv_snapshots() |
Date: |
Thu, 1 Jul 2010 09:30:38 +0200 |
Signed-off-by: Markus Armbruster <address@hidden>
---
block.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/block.c b/block.c
index acb4182..603874d 100644
--- a/block.c
+++ b/block.c
@@ -1783,19 +1783,18 @@ BlockDriverState *bdrv_snapshots(void)
{
BlockDriverState *bs;
- if (bs_snapshots)
+ if (bs_snapshots) {
return bs_snapshots;
+ }
bs = NULL;
while ((bs = bdrv_next(bs))) {
if (bdrv_can_snapshot(bs)) {
- goto ok;
+ bs_snapshots = bs;
+ return bs;
}
}
return NULL;
- ok:
- bs_snapshots = bs;
- return bs;
}
int bdrv_snapshot_create(BlockDriverState *bs,
--
1.6.6.1
- [Qemu-devel] [PATCH v3 00/13] More block-related fixes and cleanups, Markus Armbruster, 2010/07/01
- [Qemu-devel] [PATCH v3 04/13] blockdev: New drive_get_by_blockdev(), Markus Armbruster, 2010/07/01
- [Qemu-devel] [PATCH v3 07/13] blockdev: drive_get_by_id() is no longer used, remove, Markus Armbruster, 2010/07/01
- [Qemu-devel] [PATCH v3 10/13] block: Clean up bdrv_snapshots(),
Markus Armbruster <=
- [Qemu-devel] [PATCH v3 01/13] scsi: scsi_bus_legacy_handle_cmdline() can fail, fix callers, Markus Armbruster, 2010/07/01
- [Qemu-devel] [PATCH v3 03/13] blockdev: Remove drive_get_serial(), Markus Armbruster, 2010/07/01
- [Qemu-devel] [PATCH v3 02/13] ide: Make it explicit that ide_create_drive() can't fail, Markus Armbruster, 2010/07/01
- [Qemu-devel] [PATCH v3 11/13] block: Fix virtual media change for if=none, Markus Armbruster, 2010/07/01
- [Qemu-devel] [PATCH v3 09/13] savevm: Survive hot-unplug of snapshot device, Markus Armbruster, 2010/07/01
- [Qemu-devel] [PATCH v3 13/13] pc: Fix CMOS info for drives defined with -device, Markus Armbruster, 2010/07/01
- [Qemu-devel] [PATCH v3 08/13] block: Catch attempt to attach multiple devices to a blockdev, Markus Armbruster, 2010/07/01
- [Qemu-devel] [PATCH v3 12/13] ide: Make PIIX and ISA IDE init functions return the qdev, Markus Armbruster, 2010/07/01
- [Qemu-devel] [PATCH v3 06/13] qdev: Decouple qdev_prop_drive from DriveInfo, Markus Armbruster, 2010/07/01
- [Qemu-devel] [PATCH v3 05/13] blockdev: Clean up automatic drive deletion, Markus Armbruster, 2010/07/01