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

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

 



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@xxxxxxxxxx>
---
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@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: PGP 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]

  Powered by Linux