Re: [PATCH 2/6] Add public APIs for storage volume upload/download

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

 



On 03/23/2011 11:36 AM, Daniel P. Berrange wrote:
> New APIs are added allowing streaming of content to/from
> storage volumes.
> 
> * include/libvirt/libvirt.h.in: Add virStorageVolUpload and
>   virStorageVolDownload APIs
> * src/driver.h, src/libvirt.c, src/libvirt_public.syms: Stub
>   code for new APIs
> * src/storage/storage_driver.c, src/esx/esx_storage_driver.c:
>   Add dummy entries in driver table for new APIs
> ---
>  include/libvirt/libvirt.h.in |   10 +++
>  include/libvirt/virterror.h  |    1 +
>  src/driver.h                 |   14 ++++
>  src/esx/esx_storage_driver.c |    2 +
>  src/libvirt.c                |  140 ++++++++++++++++++++++++++++++++++++++++++
>  src/libvirt_public.syms      |    2 +
>  src/storage/storage_driver.c |    2 +
>  src/util/virterror.c         |    6 ++
>  8 files changed, 177 insertions(+), 0 deletions(-)

> +++ b/include/libvirt/virterror.h
> @@ -230,6 +230,7 @@ typedef enum {
>      VIR_ERR_HOOK_SCRIPT_FAILED = 70,	/* a synchronous hook script failed */
>      VIR_ERR_INVALID_DOMAIN_SNAPSHOT = 71,/* invalid domain snapshot */
>      VIR_ERR_NO_DOMAIN_SNAPSHOT = 72,	/* domain snapshot not found */
> +    VIR_ERR_INVALID_STREAM = 73         /* stream pointer not valid */

Add the trailing comma now, to reduce the diff burden later on the next
addition.

> +
> +/**
> + * virStorageVolUpload:
> + * @vol: pointer to volume to download

s/download/upload/

> + * @stream: stream to use as output

s/output/input/

> + * @offset: position to start writing to
> + * @length: limit on amount of data to upload
> + * @flags: flags for creation (unused, pass 0)
> + *
> + * Upload new content to the volume from a stream. This call
> + * will fail if @offset + @length exceeds the size of the
> + * volume. Otherwise, if @length is non-zero, and an error

s/and //

ACK with those four nits fixed.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]