qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V3 1/7] snapshot: distinguish id and name in loa


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH V3 1/7] snapshot: distinguish id and name in load_tmp
Date: Tue, 01 Oct 2013 08:35:14 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

On 09/25/2013 06:16 PM, Wenchao Xia wrote:
> 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.
> 
> Signed-off-by: Wenchao Xia <address@hidden>
> ---
>  block/qcow2-snapshot.c    |   16 +++++++++++-
>  block/qcow2.h             |    5 +++-
>  block/snapshot.c          |   58 +++++++++++++++++++++++++++++++++++++++++++-
>  include/block/block_int.h |    4 ++-
>  include/block/snapshot.h  |    7 ++++-
>  qemu-img.c                |    8 ++++-
>  6 files changed, 89 insertions(+), 9 deletions(-)
> 
> + *
> + * If both @snapshot_id and @name are specified, load the first one with
> + * id @snapshot_id and name @name.
> + * If only @snapshot_id is specified, load the first one with id
> + * @snapshot_id.
> + * If only @name is specified, load the first one with name @name.
> + * if none is specified, return -ENINVAL.

s/ENINVAL/EINVAL/

> + *
> + * Returns: 0 on success, -errno on fail. If @bs is not inserted, return
> + * -ENOMEDIUM. If @bs is not readonly, return -EINVAL. If @bs did not support
> + * internal snapshot, return -ENOTSUP. If qemu can't find one matching @id 
> and
> + * @name, return -ENOENT. If @bs do not support parameter @snapshot_id or

s/do/does/

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]