[Libvirt-cim] [PATCH] (#2) Add read-only support

Eduardo Lima (Etrunko) eblima at linux.vnet.ibm.com
Tue Jun 28 17:09:25 UTC 2011


On 06/28/2011 02:04 PM, Eduardo Lima (Etrunko) wrote:
> # HG changeset patch
> # User Eduardo Lima (Etrunko)<eblima at br.ibm.com>
> # Date 1308270993 14400
> # Node ID 5f1a03d548ef810f67be9e326d565222e01a0451
> # Parent  a2f523cd39c29977ed07247a38316d44f5123874
> Add read-only support.
>
> This patch enables a consumer of libvirt-cim to put it in read-only
> mode by adding the key-value pair 'readonly=true' to libvirt-cim.conf.
>
> Also clean-up some extra whitespace in touched files.
>
> Changes from #1:
>    - Fix build error on RHEL 6
>
> Signed-off-by: Chip Vincent<cvincent at us.ibm.com>
> Signed-off-by: Eduardo Lima (Etrunko)<eblima at br.ibm.com>
>
> diff --git a/Makefile.am b/Makefile.am
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -172,6 +172,9 @@
>
>   pkgdata_SCRIPTS = provider-register.sh
>
> +libvirtcim_confdir = @sysconfdir@
> +dist_libvirtcim_conf_DATA = @PACKAGE at .conf
> +
>   EXTRA_DIST = schema $(MOFS) $(REGS) $(INTEROP_MOFS) $(INTEROP_REGS) \
>                $(pkgdata_SCRIPTS)	libvirt-cim.spec.in libvirt-cim.spec \
>   	     doc/CodingStyle doc/SubmittingPatches      \
> diff --git a/acinclude.m4 b/acinclude.m4
> --- a/acinclude.m4
> +++ b/acinclude.m4
> @@ -270,6 +270,15 @@
>   	LDFLAGS="$LDFLAGS $LIBUUID_LIBS"
>   	])
>
> +AC_DEFUN([CHECK_LIBCONFIG],
> +	[
> +	PKG_CHECK_MODULES([LIBCONFIG], [libconfig])
> +	AC_SUBST([LIBCONFIG_CFLAGS])
> +	AC_SUBST([LIBCONFIG_LIBS])
> +	CPPFLAGS="$CPPFLAGS $LIBCONFIG_CFLAGS"
> +	LDFLAGS="$LDFLAGS $LIBCONFIG_LIBS"
> +	])
> +
>   # A convenience macro that spits out a fail message for a particular test
>   #
>   # AC_CHECK_FAIL($LIBNAME,$PACKAGE_SUGGEST,$URL,$EXTRA)
> diff --git a/configure.ac b/configure.ac
> --- a/configure.ac
> +++ b/configure.ac
> @@ -166,6 +166,7 @@
>   CHECK_LIBXML2
>   CHECK_LIBCU
>   CHECK_LIBUUID
> +CHECK_LIBCONFIG
>
>   CFLAGS_STRICT="-Werror"
>
> diff --git a/libvirt-cim.conf b/libvirt-cim.conf
> new file mode 100644
> --- /dev/null
> +++ b/libvirt-cim.conf
> @@ -0,0 +1,13 @@
> +#
> +# libvirt-cim config file
> +#
> +# This config file is based on the libconfig format. For more information,
> +# please check http://www.hyperrealm.com/libconfig/
> +#
> +
> +# readonly (boolean)
> +#  Defines wether connection to libvirt is read-only or not

Ouch, forgot to add the config file to the commit, please ignore this.

-- 
Eduardo de Barros Lima
Software Engineer, Open Virtualization
Linux Technology Center - IBM/Brazil
eblima at br.ibm.com




More information about the Libvirt-cim mailing list