diff options
author | Wenchao Xia <xiawenc@linux.vnet.ibm.com> | 2013-12-04 17:10:54 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-12-04 15:19:00 +0100 |
commit | 7b4c4781e390a041fa0ef70817678f1b97fc6db6 (patch) | |
tree | 3506ed0d0b5789ee3af96cff47b66ad064466c83 /block/qcow2.h | |
parent | 34602dd6424c4f1cc414ba672f4f430182b5d9f2 (diff) |
snapshot: distinguish id and name in load_tmp
Since later this function will be used so improve it. The only caller of it
now is qemu-img, and it is not impacted by introduce function
bdrv_snapshot_load_tmp_by_id_or_name() that call bdrv_snapshot_load_tmp()
twice to keep old search logic. bdrv_snapshot_load_tmp_by_id_or_name() return
int to let caller know the errno, and errno will be used later.
Also fix a typo in comments of bdrv_snapshot_delete().
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/qcow2.h')
-rw-r--r-- | block/qcow2.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/block/qcow2.h b/block/qcow2.h index 922e19062a..303eb26629 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -488,7 +488,10 @@ int qcow2_snapshot_delete(BlockDriverState *bs, const char *name, Error **errp); int qcow2_snapshot_list(BlockDriverState *bs, QEMUSnapshotInfo **psn_tab); -int qcow2_snapshot_load_tmp(BlockDriverState *bs, const char *snapshot_name); +int qcow2_snapshot_load_tmp(BlockDriverState *bs, + const char *snapshot_id, + const char *name, + Error **errp); void qcow2_free_snapshots(BlockDriverState *bs); int qcow2_read_snapshots(BlockDriverState *bs); |