[libvirt] [PATCH 07/14] util: storage: Modify return value of virStorageSourceNewFromBacking

Ján Tomko jtomko at redhat.com
Wed Aug 21 15:08:50 UTC 2019


On Fri, Aug 16, 2019 at 12:39:28PM +0200, Peter Krempa wrote:
>Return the storage source definition via a pointer in the arguments and
>document the returned values. This will simplify the possibility to
>ignore certain backing store types which are not representable by
>libvirt.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/storage/storage_util.c |  2 +-
> src/util/virstoragefile.c  | 59 ++++++++++++++++++++++++--------------
> src/util/virstoragefile.h  |  4 ++-
> 3 files changed, 41 insertions(+), 24 deletions(-)
>
>diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
>index 6fff013e3a..4e57a0438e 100644
>--- a/src/util/virstoragefile.c
>+++ b/src/util/virstoragefile.c
>@@ -3679,42 +3679,57 @@ virStorageSourceNewFromBackingAbsolute(const char *path)
> }
>
>
>-virStorageSourcePtr
>-virStorageSourceNewFromBacking(virStorageSourcePtr parent)
>+/**
>+ * virStorageSourceNewFromBacking:
>+ * @parent: storage source parent
>+ * @backing: returned backing store definition
>+ *
>+ * Creates a storage source which describes the backing image of @parent and
>+ * fills it into @backing depending on the 'backingStoreRaw' property of @parent
>+ * and other data. Note that for local storage this function interrogates the

Not quite sure what 'interrogates' is supposed to mean in this context.
Perhaps you could use another verb?

>+ * actual type of the backing store.
>+ *
>+ * Returns 0 and fills @backing, or -1 on error (with appropriate error reported).
>+ */
>+int
>+virStorageSourceNewFromBacking(virStorageSourcePtr parent,
>+                               virStorageSourcePtr *backing)
> {

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190821/af62e80b/attachment-0001.sig>


More information about the libvir-list mailing list