Re: [PATCH v2 1/9] libvirt: Export libvirt config getters by moving them to util

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

 



On Fri, Oct 16, 2015 at 08:12:18PM +0200, Erik Skultety wrote:
virConnectGetConfig and virConnectGetConfigPath were static libvirt
methods, merely because there hasn't been any need for having them
internally exported yet. Since libvirt-admin also needs to reference
libvirt config file, 'xGetConfig' should be exported.
Besides moving, this patch also renames the methods accordingly,
as they are libvirt config specific.
---
src/libvirt.c            | 55 +-----------------------------------------------
src/libvirt_private.syms |  1 +
src/util/virconf.c       | 52 +++++++++++++++++++++++++++++++++++++++++++++
src/util/virconf.h       |  2 +-
4 files changed, 55 insertions(+), 55 deletions(-)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index be6ee19..b72a0ee 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1332,6 +1332,7 @@ virConfTypeToString;
virConfWalk;
virConfWriteFile;
virConfWriteMem;
+virGetLibvirtConfigFile;

I would name it virConf... to go with the rest of the file.  How about
virConfLoad() or virConfLoadDefault().  We don't necessarily need over
20 characters long names for each function in our source =D

diff --git a/src/util/virconf.h b/src/util/virconf.h
index 8037956..dad7dba 100644
--- a/src/util/virconf.h
+++ b/src/util/virconf.h
@@ -96,5 +96,5 @@ int virConfWriteFile(const char *filename,
int virConfWriteMem(char *memory,
                    int *len,
                    virConfPtr conf);
-
+int virGetLibvirtConfigFile(virConfPtr *conf);
#endif /* __VIR_CONF_H__ */

Keep the space between the declaration and the #endif.

ACK with those things fixed.

Martin

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]