[libvirt] [PATCH v3 1/2] Extend virDomainParseMemory for use outside domain_conf
Michal Privoznik
mprivozn at redhat.com
Mon Nov 10 14:06:11 UTC 2014
On 10.11.2014 12:52, Prerna Saxena wrote:
>
> From 4978c8c2df19bdf738695d6cc64864f11071a08e Mon Sep 17 00:00:00 2001
> From: Prerna Saxena <prerna at linux.vnet.ibm.com>
> Date: Mon, 10 Nov 2014 14:48:03 +0530
>
>
> Commit 01b4de2b9f5ca82 abstracts virDomainParseMemory()
> for use by other functions in domain_conf.c
> Extend the same for use, for functions outside of this file.
>
> Signed-off-by: Prerna Saxena <prerna at linux.vnet.ibm.com>
> ---
> src/conf/domain_conf.c | 2 +-
> src/conf/domain_conf.h | 8 ++++++++
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index e8d8f7d..5909655 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -6421,7 +6421,7 @@ virDomainParseScaledValue(const char *xpath,
> *
> * Return 0 on success, -1 on failure after issuing error.
> */
> -static int
> +int
> virDomainParseMemory(const char *xpath,
> const char *units_xpath,
> xmlXPathContextPtr ctxt,
> diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
> index fbb3b2f..9fb05c8 100644
> --- a/src/conf/domain_conf.h
> +++ b/src/conf/domain_conf.h
> @@ -2847,6 +2847,14 @@ int virDomainObjSetMetadata(virDomainObjPtr vm,
> const char *configDir,
> unsigned int flags);
>
> +int
> +virDomainParseMemory(const char *xpath,
> + const char *units_xpath,
> + xmlXPathContextPtr ctxt,
> + unsigned long long *mem,
> + bool required,
> + bool capped);
> +
> bool virDomainDefNeedsPlacementAdvice(virDomainDefPtr def)
> ATTRIBUTE_NONNULL(1);
>
>
Any symbol that is to be exported as an internal API must be in
src/libvirt_private.syms. So ACK with this squashed in:
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 7e38cc6..b8f35e8 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -364,6 +364,7 @@ virDomainObjSetDefTransient;
virDomainObjSetMetadata;
virDomainObjSetState;
virDomainObjTaint;
+virDomainParseMemory;
virDomainPausedReasonTypeFromString;
virDomainPausedReasonTypeToString;
virDomainPMSuspendedReasonTypeFromString;
Michal
More information about the libvir-list
mailing list