[PATCH] Fix file permissions
by Eduardo Lima (Etrunko)
# HG changeset patch
# User Eduardo Lima (Etrunko) <eblima(a)br.ibm.com>
# Date 1306261772 10800
# Node ID 86998e0d6368e290e34ba61985b9d19cbeb7fef3
# Parent f51a1ccadbcce1c7f9ba6268267866f7721420c1
Fix file permissions
Removing exec flag from source code files.
Signed-off-by: Eduardo Lima (Etrunko) <eblima(a)br.ibm.com>
diff --git a/Makefile.am b/Makefile.am
old mode 100755
new mode 100644
diff --git a/README b/README
old mode 100755
new mode 100644
diff --git a/acinclude.m4 b/acinclude.m4
old mode 100755
new mode 100644
diff --git a/base_schema/Makefile.am b/base_schema/Makefile.am
old mode 100755
new mode 100644
diff --git a/base_schema/install_base_schema.sh.in b/base_schema/install_base_schema.sh.in
old mode 100755
new mode 100644
diff --git a/configure.ac b/configure.ac
old mode 100755
new mode 100644
diff --git a/doc/CodingStyle b/doc/CodingStyle
old mode 100755
new mode 100644
diff --git a/doc/Makefile.am b/doc/Makefile.am
old mode 100755
new mode 100644
diff --git a/doc/libvirt-cim.html b/doc/libvirt-cim.html
old mode 100755
new mode 100644
diff --git a/libvirt-cim.spec.in b/libvirt-cim.spec.in
old mode 100755
new mode 100644
diff --git a/libxkutil/Makefile.am b/libxkutil/Makefile.am
old mode 100755
new mode 100644
diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c
old mode 100755
new mode 100644
diff --git a/libxkutil/device_parsing.h b/libxkutil/device_parsing.h
old mode 100755
new mode 100644
diff --git a/libxkutil/infostore.c b/libxkutil/infostore.c
old mode 100755
new mode 100644
diff --git a/libxkutil/misc_util.c b/libxkutil/misc_util.c
old mode 100755
new mode 100644
diff --git a/libxkutil/misc_util.h b/libxkutil/misc_util.h
old mode 100755
new mode 100644
diff --git a/libxkutil/xml_parse_test.c b/libxkutil/xml_parse_test.c
old mode 100755
new mode 100644
diff --git a/libxkutil/xmlgen.c b/libxkutil/xmlgen.c
old mode 100755
new mode 100644
diff --git a/schema/AllocationCapabilities.registration b/schema/AllocationCapabilities.registration
old mode 100755
new mode 100644
diff --git a/schema/ComputerSystem.registration b/schema/ComputerSystem.registration
old mode 100755
new mode 100644
diff --git a/schema/ComputerSystemIndication.registration b/schema/ComputerSystemIndication.registration
old mode 100755
new mode 100644
diff --git a/schema/ComputerSystemMigrationIndication.mof b/schema/ComputerSystemMigrationIndication.mof
old mode 100755
new mode 100644
diff --git a/schema/ComputerSystemMigrationIndication.registration b/schema/ComputerSystemMigrationIndication.registration
old mode 100755
new mode 100644
diff --git a/schema/ConcreteComponent.registration b/schema/ConcreteComponent.registration
old mode 100755
new mode 100644
diff --git a/schema/ConsoleRedirectionService.mof b/schema/ConsoleRedirectionService.mof
old mode 100755
new mode 100644
diff --git a/schema/ConsoleRedirectionService.registration b/schema/ConsoleRedirectionService.registration
old mode 100755
new mode 100644
diff --git a/schema/ConsoleRedirectionServiceCapabilities.registration b/schema/ConsoleRedirectionServiceCapabilities.registration
old mode 100755
new mode 100644
diff --git a/schema/DiskPool.registration b/schema/DiskPool.registration
old mode 100755
new mode 100644
diff --git a/schema/ElementAllocatedFromPool.registration b/schema/ElementAllocatedFromPool.registration
old mode 100755
new mode 100644
diff --git a/schema/ElementConformsToProfile.registration b/schema/ElementConformsToProfile.registration
old mode 100755
new mode 100644
diff --git a/schema/ElementSettingData.mof b/schema/ElementSettingData.mof
old mode 100755
new mode 100644
diff --git a/schema/ElementSettingData.registration b/schema/ElementSettingData.registration
old mode 100755
new mode 100644
diff --git a/schema/EnabledLogicalElementCapabilities.registration b/schema/EnabledLogicalElementCapabilities.registration
old mode 100755
new mode 100644
diff --git a/schema/GraphicsPool.mof b/schema/GraphicsPool.mof
old mode 100755
new mode 100644
diff --git a/schema/GraphicsPool.registration b/schema/GraphicsPool.registration
old mode 100755
new mode 100644
diff --git a/schema/HostSystem.registration b/schema/HostSystem.registration
old mode 100755
new mode 100644
diff --git a/schema/HostedAccessPoint.mof b/schema/HostedAccessPoint.mof
old mode 100755
new mode 100644
diff --git a/schema/HostedAccessPoint.registration b/schema/HostedAccessPoint.registration
old mode 100755
new mode 100644
diff --git a/schema/HostedDependency.mof b/schema/HostedDependency.mof
old mode 100755
new mode 100644
diff --git a/schema/HostedDependency.registration b/schema/HostedDependency.registration
old mode 100755
new mode 100644
diff --git a/schema/HostedResourcePool.registration b/schema/HostedResourcePool.registration
old mode 100755
new mode 100644
diff --git a/schema/HostedService.registration b/schema/HostedService.registration
old mode 100755
new mode 100644
diff --git a/schema/InputPool.mof b/schema/InputPool.mof
old mode 100755
new mode 100644
diff --git a/schema/InputPool.registration b/schema/InputPool.registration
old mode 100755
new mode 100644
diff --git a/schema/KVMRedirectionSAP.mof b/schema/KVMRedirectionSAP.mof
old mode 100755
new mode 100644
diff --git a/schema/KVMRedirectionSAP.registration b/schema/KVMRedirectionSAP.registration
old mode 100755
new mode 100644
diff --git a/schema/LogicalDisk.registration b/schema/LogicalDisk.registration
old mode 100755
new mode 100644
diff --git a/schema/Memory.registration b/schema/Memory.registration
old mode 100755
new mode 100644
diff --git a/schema/MemoryPool.registration b/schema/MemoryPool.registration
old mode 100755
new mode 100644
diff --git a/schema/NetPool.registration b/schema/NetPool.registration
old mode 100755
new mode 100644
diff --git a/schema/NetworkPort.registration b/schema/NetworkPort.registration
old mode 100755
new mode 100644
diff --git a/schema/Processor.registration b/schema/Processor.registration
old mode 100755
new mode 100644
diff --git a/schema/ProcessorPool.registration b/schema/ProcessorPool.registration
old mode 100755
new mode 100644
diff --git a/schema/ReferencedProfile.mof b/schema/ReferencedProfile.mof
old mode 100755
new mode 100644
diff --git a/schema/ReferencedProfile.registration b/schema/ReferencedProfile.registration
old mode 100755
new mode 100644
diff --git a/schema/ResourceAllocationFromPool.registration b/schema/ResourceAllocationFromPool.registration
old mode 100755
new mode 100644
diff --git a/schema/ResourceAllocationSettingData.mof b/schema/ResourceAllocationSettingData.mof
old mode 100755
new mode 100644
diff --git a/schema/ResourceAllocationSettingData.registration b/schema/ResourceAllocationSettingData.registration
old mode 100755
new mode 100644
diff --git a/schema/ResourcePoolConfigurationCapabilities.registration b/schema/ResourcePoolConfigurationCapabilities.registration
old mode 100755
new mode 100644
diff --git a/schema/ResourcePoolConfigurationService.registration b/schema/ResourcePoolConfigurationService.registration
old mode 100755
new mode 100644
diff --git a/schema/ServiceAccessBySAP.mof b/schema/ServiceAccessBySAP.mof
old mode 100755
new mode 100644
diff --git a/schema/ServiceAccessBySAP.registration b/schema/ServiceAccessBySAP.registration
old mode 100755
new mode 100644
diff --git a/schema/SettingsDefineCapabilities.registration b/schema/SettingsDefineCapabilities.registration
old mode 100755
new mode 100644
diff --git a/schema/SettingsDefineState.registration b/schema/SettingsDefineState.registration
old mode 100755
new mode 100644
diff --git a/schema/SystemDevice.registration b/schema/SystemDevice.registration
old mode 100755
new mode 100644
diff --git a/schema/VSMigrationCapabilities.mof b/schema/VSMigrationCapabilities.mof
old mode 100755
new mode 100644
diff --git a/schema/VSMigrationCapabilities.registration b/schema/VSMigrationCapabilities.registration
old mode 100755
new mode 100644
diff --git a/schema/VSMigrationService.mof b/schema/VSMigrationService.mof
old mode 100755
new mode 100644
diff --git a/schema/VSMigrationService.registration b/schema/VSMigrationService.registration
old mode 100755
new mode 100644
diff --git a/schema/VSMigrationSettingData.mof b/schema/VSMigrationSettingData.mof
old mode 100755
new mode 100644
diff --git a/schema/VSMigrationSettingData.registration b/schema/VSMigrationSettingData.registration
old mode 100755
new mode 100644
diff --git a/schema/VSSD.mof b/schema/VSSD.mof
old mode 100755
new mode 100644
diff --git a/schema/VSSD.registration b/schema/VSSD.registration
old mode 100755
new mode 100644
diff --git a/schema/VSSDComponent.mof b/schema/VSSDComponent.mof
old mode 100755
new mode 100644
diff --git a/schema/VSSDComponent.registration b/schema/VSSDComponent.registration
old mode 100755
new mode 100644
diff --git a/schema/Virt_ResourceAllocationSettingData.mof b/schema/Virt_ResourceAllocationSettingData.mof
old mode 100755
new mode 100644
diff --git a/schema/Virt_VSSD.mof b/schema/Virt_VSSD.mof
old mode 100755
new mode 100644
diff --git a/schema/VirtualSystemManagementCapabilities.registration b/schema/VirtualSystemManagementCapabilities.registration
old mode 100755
new mode 100644
diff --git a/schema/VirtualSystemManagementService.registration b/schema/VirtualSystemManagementService.registration
old mode 100755
new mode 100644
diff --git a/schema/VirtualSystemSnapshotService.mof b/schema/VirtualSystemSnapshotService.mof
old mode 100755
new mode 100644
diff --git a/src/Makefile.am b/src/Makefile.am
old mode 100755
new mode 100644
diff --git a/src/Virt_AllocationCapabilities.c b/src/Virt_AllocationCapabilities.c
old mode 100755
new mode 100644
diff --git a/src/Virt_AllocationCapabilities.h b/src/Virt_AllocationCapabilities.h
old mode 100755
new mode 100644
diff --git a/src/Virt_ComputerSystem.c b/src/Virt_ComputerSystem.c
old mode 100755
new mode 100644
diff --git a/src/Virt_ComputerSystem.h b/src/Virt_ComputerSystem.h
old mode 100755
new mode 100644
diff --git a/src/Virt_ComputerSystemIndication.c b/src/Virt_ComputerSystemIndication.c
old mode 100755
new mode 100644
diff --git a/src/Virt_ComputerSystemMigrationIndication.c b/src/Virt_ComputerSystemMigrationIndication.c
old mode 100755
new mode 100644
diff --git a/src/Virt_ConcreteComponent.c b/src/Virt_ConcreteComponent.c
old mode 100755
new mode 100644
diff --git a/src/Virt_ConsoleRedirectionService.c b/src/Virt_ConsoleRedirectionService.c
old mode 100755
new mode 100644
diff --git a/src/Virt_ConsoleRedirectionServiceCapabilities.c b/src/Virt_ConsoleRedirectionServiceCapabilities.c
old mode 100755
new mode 100644
diff --git a/src/Virt_ConsoleRedirectionServiceCapabilities.h b/src/Virt_ConsoleRedirectionServiceCapabilities.h
old mode 100755
new mode 100644
diff --git a/src/Virt_Device.c b/src/Virt_Device.c
old mode 100755
new mode 100644
diff --git a/src/Virt_DevicePool.c b/src/Virt_DevicePool.c
old mode 100755
new mode 100644
diff --git a/src/Virt_DevicePool.h b/src/Virt_DevicePool.h
old mode 100755
new mode 100644
diff --git a/src/Virt_ElementAllocatedFromPool.c b/src/Virt_ElementAllocatedFromPool.c
old mode 100755
new mode 100644
diff --git a/src/Virt_ElementCapabilities.c b/src/Virt_ElementCapabilities.c
old mode 100755
new mode 100644
diff --git a/src/Virt_ElementConformsToProfile.c b/src/Virt_ElementConformsToProfile.c
old mode 100755
new mode 100644
diff --git a/src/Virt_ElementSettingData.c b/src/Virt_ElementSettingData.c
old mode 100755
new mode 100644
diff --git a/src/Virt_EnabledLogicalElementCapabilities.c b/src/Virt_EnabledLogicalElementCapabilities.c
old mode 100755
new mode 100644
diff --git a/src/Virt_HostSystem.c b/src/Virt_HostSystem.c
old mode 100755
new mode 100644
diff --git a/src/Virt_HostSystem.h b/src/Virt_HostSystem.h
old mode 100755
new mode 100644
diff --git a/src/Virt_HostedAccessPoint.c b/src/Virt_HostedAccessPoint.c
old mode 100755
new mode 100644
diff --git a/src/Virt_HostedDependency.c b/src/Virt_HostedDependency.c
old mode 100755
new mode 100644
diff --git a/src/Virt_HostedResourcePool.c b/src/Virt_HostedResourcePool.c
old mode 100755
new mode 100644
diff --git a/src/Virt_HostedService.c b/src/Virt_HostedService.c
old mode 100755
new mode 100644
diff --git a/src/Virt_KVMRedirectionSAP.c b/src/Virt_KVMRedirectionSAP.c
old mode 100755
new mode 100644
diff --git a/src/Virt_KVMRedirectionSAP.h b/src/Virt_KVMRedirectionSAP.h
old mode 100755
new mode 100644
diff --git a/src/Virt_RASD.c b/src/Virt_RASD.c
old mode 100755
new mode 100644
diff --git a/src/Virt_RASD.h b/src/Virt_RASD.h
old mode 100755
new mode 100644
diff --git a/src/Virt_ReferencedProfile.c b/src/Virt_ReferencedProfile.c
old mode 100755
new mode 100644
diff --git a/src/Virt_RegisteredProfile.c b/src/Virt_RegisteredProfile.c
old mode 100755
new mode 100644
diff --git a/src/Virt_ResourceAllocationFromPool.c b/src/Virt_ResourceAllocationFromPool.c
old mode 100755
new mode 100644
diff --git a/src/Virt_ResourcePoolConfigurationCapabilities.c b/src/Virt_ResourcePoolConfigurationCapabilities.c
old mode 100755
new mode 100644
diff --git a/src/Virt_ResourcePoolConfigurationService.c b/src/Virt_ResourcePoolConfigurationService.c
old mode 100755
new mode 100644
diff --git a/src/Virt_ResourcePoolConfigurationService.h b/src/Virt_ResourcePoolConfigurationService.h
old mode 100755
new mode 100644
diff --git a/src/Virt_ServiceAccessBySAP.c b/src/Virt_ServiceAccessBySAP.c
old mode 100755
new mode 100644
diff --git a/src/Virt_ServiceAffectsElement.c b/src/Virt_ServiceAffectsElement.c
old mode 100755
new mode 100644
diff --git a/src/Virt_SettingsDefineCapabilities.c b/src/Virt_SettingsDefineCapabilities.c
old mode 100755
new mode 100644
diff --git a/src/Virt_SettingsDefineCapabilities.h b/src/Virt_SettingsDefineCapabilities.h
old mode 100755
new mode 100644
diff --git a/src/Virt_SettingsDefineState.c b/src/Virt_SettingsDefineState.c
old mode 100755
new mode 100644
diff --git a/src/Virt_SystemDevice.c b/src/Virt_SystemDevice.c
old mode 100755
new mode 100644
diff --git a/src/Virt_VSMigrationCapabilities.c b/src/Virt_VSMigrationCapabilities.c
old mode 100755
new mode 100644
diff --git a/src/Virt_VSMigrationService.c b/src/Virt_VSMigrationService.c
old mode 100755
new mode 100644
diff --git a/src/Virt_VSMigrationService.h b/src/Virt_VSMigrationService.h
old mode 100755
new mode 100644
diff --git a/src/Virt_VSMigrationSettingData.c b/src/Virt_VSMigrationSettingData.c
old mode 100755
new mode 100644
diff --git a/src/Virt_VSSD.c b/src/Virt_VSSD.c
old mode 100755
new mode 100644
diff --git a/src/Virt_VSSDComponent.c b/src/Virt_VSSDComponent.c
old mode 100755
new mode 100644
diff --git a/src/Virt_VirtualSystemManagementCapabilities.c b/src/Virt_VirtualSystemManagementCapabilities.c
old mode 100755
new mode 100644
diff --git a/src/Virt_VirtualSystemManagementService.c b/src/Virt_VirtualSystemManagementService.c
old mode 100755
new mode 100644
diff --git a/src/Virt_VirtualSystemManagementService.h b/src/Virt_VirtualSystemManagementService.h
old mode 100755
new mode 100644
diff --git a/src/Virt_VirtualSystemSnapshotService.c b/src/Virt_VirtualSystemSnapshotService.c
old mode 100755
new mode 100644
diff --git a/src/Virt_VirtualSystemSnapshotService.h b/src/Virt_VirtualSystemSnapshotService.h
old mode 100755
new mode 100644
diff --git a/src/profiles.h b/src/profiles.h
old mode 100755
new mode 100644
diff --git a/src/svpc_types.h b/src/svpc_types.h
old mode 100755
new mode 100644
13 years, 3 months
[PATCH] Configure tweaks
by Eduardo Lima (Etrunko)
# HG changeset patch
# User Eduardo Lima (Etrunko) <eblima(a)br.ibm.com>
# Date 1306268000 10800
# Node ID cbca2d7ce313a0d3c26d77e04f5e36d7c4549e3e
# Parent a93bab93b304329e9f63d50a8d46cab427271c8d
Configure tweaks
acinclude.m4
- Better output when checking for CMPI includes
configure.ac
- Use automake silent rules if available
- Introduce libtool version-info. Notice that changes in
Makefile.am are necessary in order to produce versioned .so.
Due to the large amount of libraries we generate, it is a big
patch and I will send it separately.
Signed-off-by: Eduardo Lima (Etrunko) <eblima(a)br.ibm.com>
diff -r a93bab93b304 -r cbca2d7ce313 acinclude.m4
--- a/acinclude.m4 Tue May 24 17:02:49 2011 -0300
+++ b/acinclude.m4 Tue May 24 17:13:20 2011 -0300
@@ -71,11 +71,9 @@
],
[
have_CMPI=yes
- dnl AC_MSG_RESULT(yes)
],
[
have_CMPI=no
- dnl AC_MSG_RESULT(no)
])
])
@@ -88,7 +86,7 @@
AC_DEFUN([CHECK_CMPI],
[
- AC_MSG_CHECKING(for CMPI headers)
+ AC_MSG_NOTICE([checking for CMPI headers...])
dnl Check just with the standard include paths
CMPI_CPP_FLAGS="$CPPFLAGS"
_CHECK_CMPI(standard)
@@ -96,6 +94,7 @@
dnl The standard include paths worked.
AC_MSG_RESULT(yes)
else
+ AC_MSG_RESULT(no)
_DIRS_="/usr/include/cmpi \
/usr/local/include/cmpi \
$PEGASUS_ROOT/src/Pegasus/Provider/CMPI \
@@ -115,13 +114,15 @@
dnl Save the new -I parameter
CMPI_CPP_FLAGS="$CPPFLAGS"
break
+ else
+ AC_MSG_RESULT(no)
fi
CPPFLAGS=$_cppflags
done
fi
CPPFLAGS="$CMPI_CPP_FLAGS"
if test "$have_CMPI" == "no"; then
- AC_MSG_ERROR(no. Sorry cannot find CMPI headers files.)
+ AC_MSG_ERROR(Cannot find CMPI headers files.)
fi
]
)
@@ -133,7 +134,7 @@
AC_DEFUN([CHECK_PROVIDERDIR],
[
- AC_MSG_CHECKING(for CMPI provider directory)
+ AC_MSG_NOTICE([checking for CMPI provider directory])
_DIRS="$libdir/cmpi"
save_exec_prefix=${exec_prefix}
save_prefix=${prefix}
@@ -146,7 +147,7 @@
for _dir in $_DIRS
do
_xdir=`eval echo $_dir`
- AC_MSG_CHECKING( $_dir )
+ AC_MSG_CHECKING([for $_dir])
if test -d $_xdir ; then
dnl Found it
AC_MSG_RESULT(yes)
@@ -172,7 +173,7 @@
AC_DEFUN([CHECK_CIMSERVER],
[
- AC_MSG_CHECKING(for CIM servers)
+ AC_MSG_NOTICE([checking for CIM servers])
if test x"$CIMSERVER" = x
then
_SERVERS="sfcbd cimserver owcimomd"
@@ -194,13 +195,18 @@
esac
fi
break;
- fi
+ fi
+ done
+ if test x"$CIMSERVER" == x; then
+ AC_MSG_RESULT(no)
+ else
+ break
+ fi
done
- done
PATH=$_SAVE_PATH
if test x"$CIMSERVER" == x ; then
CIMSERVER=sfcb
- AC_MSG_RESULT(implied: $CIMSERVER)
+ AC_MSG_WARN([CIM server implied: $CIMSERVER])
fi
fi
# Cross platform only needed for sfcb currently
diff -r a93bab93b304 -r cbca2d7ce313 configure.ac
--- a/configure.ac Tue May 24 17:02:49 2011 -0300
+++ b/configure.ac Tue May 24 17:13:20 2011 -0300
@@ -1,10 +1,34 @@
# (C) Copyright IBM Corp. 2005
+m4_define([libvirtcim_maj], [0])
+m4_define([libvirtcim_min], [5])
+m4_define([libvirtcim_mic], [12])
+m4_define([libvirtcim_version], [libvirtcim_maj.libvirtcim_min.libvirtcim_mic])
-AC_INIT(libvirt CMPI provider, 0.5.12, cvincent(a)us.ibm.com, libvirt-cim)
+AC_INIT([libvirt CMPI provider], [libvirtcim_version], [cvincent(a)us.ibm.com],
+ [libvirt-cim])
AC_CONFIG_SRCDIR([src/Virt_ComputerSystem.c])
+# Autogenerate the autoconf header file to store build settings
+AC_CONFIG_HEADER([config.h])
+
+# Use silent rules if possible
+AM_INIT_AUTOMAKE
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+m4_define([lt_cur], m4_eval(libvirtcim_maj + libvirtcim_min))
+m4_define([lt_rev], libvirtcim_mic)
+m4_define([lt_age], libvirtcim_min)
+VERSION_INFO="lt_cur:lt_rev:lt_age"
+AC_SUBST(VERSION_INFO)
+
+AC_PROG_CC
+AC_C_CONST
+AC_PROG_LIBTOOL
+AC_PROG_INSTALL
+AC_CHECK_HEADERS([stdlib.h string.h unistd.h])
AC_CHECK_HEADERS([stdarg.h errno.h])
+AC_HEADER_STDC
AC_CHECK_FUNCS([popen pclose fgets asprintf vfprintf fprintf snprintf sscanf])
CPPFLAGS="$CPPFLAGS -DCMPI_VERSION=100"
@@ -109,12 +133,6 @@
AC_SUBST(XEN_EMULATOR)
AC_DEFINE_UNQUOTED(XEN_EMULATOR, "$XEN_EMULATOR", [Location of Xen FullVirt emulator])
-# Autogenerate the autoconf header file to store build settings
-AC_CONFIG_HEADER([config.h])
-
-topdir=`pwd`
-AC_SUBST(topdir)
-
AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc)
# Autogenerate the Makefile
@@ -129,14 +147,6 @@
Makefile
])
-AM_INIT_AUTOMAKE
-
-AC_PROG_CC
-AC_C_CONST
-AC_PROG_LIBTOOL
-AC_PROG_INSTALL
-AC_CHECK_HEADERS([stdlib.h string.h unistd.h])
-AC_HEADER_STDC
# Check for the required CMPI header files (this macro is defined in acinclude.m4)
CHECK_CMPI
13 years, 3 months
[PATCH] libcmpiutil: Add libtool version info
by Eduardo Lima (Etrunko)
# HG changeset patch
# User Eduardo Lima (Etrunko) <eblima(a)br.ibm.com>
# Date 1305902058 10800
# Node ID 4bc55e4ed0c003e5e56205d64839b1b239921e92
# Parent 308920f42e59be2aa8a4055a277fed5c373a319e
libcmpiutil: Add libtool version info
With this patch, we will produce nicely versioned .so for libcmpiutil
and libcueoparser, as follows:
/usr/lib64/libcmpiutil.so -> libcmpiutil.so.0.5.5
/usr/lib64/libcmpiutil.so.0 -> libcmpiutil.so.0.5.5
/usr/lib64/libcmpiutil.so.0.5.5
/usr/lib64/libcueoparser.so -> libcueoparser.so.0.5.5
/usr/lib64/libcueoparser.so.0 -> libcueoparser.so.0.5.5
/usr/lib64/libcueoparser.so.0.5.5
Signed-off-by: Eduardo Lima (Etrunko) <eblima(a)br.ibm.com>
diff --git a/Makefile.am b/Makefile.am
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,6 +25,7 @@
debug_util.c eo_parser_xml.c
libcmpiutil_la_CFLAGS = $(CFLAGS) $(CFLAGS_STRICT)
libcmpiutil_la_LIBADD = -lxml2
+libcmpiutil_la_LDFLAGS = -version-info @CMPIUTIL_VERSION_INFO@
libcmpiutil_la_DEPENDENCIES =
AM_LFLAGS = -Peo_parse_
@@ -32,6 +33,7 @@
if build_eoparser
libcueoparser_la_SOURCES = eo_util_parser.y eo_util_lexer.l eo_parser.c
+libcueoparser_la_LDFLAGS = -version-info @CMPIUTIL_VERSION_INFO@
libcmpiutil_la_DEPENDENCIES += libcueoparser.la
libcmpiutil_la_LIBADD += -lcueoparser
EOPARSER = libcueoparser.la
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,10 @@
# Copyright IBM Corp. 2007
-AC_INIT(CMPI Utility Library, 0.5.5, cvincent(a)us.ibm.com, libcmpiutil)
+m4_define([cmpiutil_maj], [0])
+m4_define([cmpiutil_min], [5])
+m4_define([cmpiutil_mic], [5])
+m4_define([cmpiutil_version], [cmpiutil_maj.cmpiutil_min.cmpiutil_mic])
+
+AC_INIT([CMPI Utility Library], [cmpiutil_version], [cvincent(a)us.ibm.com], [libcmpiutil])
AC_CONFIG_SRCDIR([libcmpiutil.h])
@@ -34,6 +39,12 @@
AM_INIT_AUTOMAKE
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+m4_define([lt_cur], m4_eval(cmpiutil_maj + cmpiutil_min))
+m4_define([lt_rev], cmpiutil_mic)
+m4_define([lt_age], cmpiutil_min)
+CMPIUTIL_VERSION_INFO="lt_cur:lt_rev:lt_age"
+AC_SUBST(CMPIUTIL_VERSION_INFO)
+
AC_PROG_CC
AC_PROG_LEX
13 years, 3 months
[PATCH] (#3) Configure: Check for libuuid
by Eduardo Lima (Etrunko)
# HG changeset patch
# User Eduardo Lima (Etrunko) <eblima(a)br.ibm.com>
# Date 1304971973 10800
# Node ID 845daca07eed6b26555f71a7c761ec945fdc644a
# Parent 8b428df21c360d1eaedba7157b0dfd429d2db121
Configure: Check for libuuid
This patch introduces a macro in acinclude.m4 to check for libuuid
development files and fixes the build accordingly.
Changes from v1:
Added specific check for libuuid version < 1.41.2
Changes from v2:
Respect 80 characters limit
Signed-off-by: Eduardo Lima (Etrunko) <eblima(a)br.ibm.com>
diff -r 8b428df21c36 -r 845daca07eed acinclude.m4
--- a/acinclude.m4 Wed Apr 13 12:27:33 2011 -0700
+++ b/acinclude.m4 Mon May 09 17:12:53 2011 -0300
@@ -238,10 +238,32 @@
AC_DEFUN([CHECK_LIBVIRT],
[
PKG_CHECK_MODULES([LIBVIRT], [libvirt >= 0.3.2])
+ AC_SUBST([LIBVIRT_CFLAGS])
+ AC_SUBST([LIBVIRT_LIBS])
CPPFLAGS="$CPPFLAGS $LIBVIRT_CFLAGS"
LDFLAGS="$LDFLAGS $LIBVIRT_LIBS"
])
+AC_DEFUN([CHECK_LIBUUID],
+ [
+ PKG_CHECK_MODULES([LIBUUID], [uuid >= 1.41.2],
+ [LIBUUID_FOUND=yes], [LIBUUID_FOUND=no])
+ if test "$LIBUUID_FOUND" = "no" ; then
+ PKG_CHECK_MODULES([LIBUUID], [uuid],
+ [LIBUUID_FOUND=yes], [LIBUUID_FOUND=no])
+ if test "$LIBUUID_FOUND" = "no" ; then
+ AC_MSG_ERROR([libuuid development files required])
+ else
+ LIBUUID_INCLUDEDIR=$(pkg-config --variable=includedir uuid)
+ LIBUUID_CFLAGS+=" -I$LIBUUID_INCLUDEDIR/uuid "
+ fi
+ fi
+ AC_SUBST([LIBUUID_CFLAGS])
+ AC_SUBST([LIBUUID_LIBS])
+ CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS"
+ LDFLAGS="$LDFLAGS $LIBUUID_LIBS"
+ ])
+
# A convenience macro that spits out a fail message for a particular test
#
# AC_CHECK_FAIL($LIBNAME,$PACKAGE_SUGGEST,$URL,$EXTRA)
diff -r 8b428df21c36 -r 845daca07eed configure.ac
--- a/configure.ac Wed Apr 13 12:27:33 2011 -0700
+++ b/configure.ac Mon May 09 17:12:53 2011 -0300
@@ -148,10 +148,14 @@
# Check for presense of a CIM server (this macro is defined in acinclude.m4)
CHECK_CIMSERVER
+# Check pkg-config program
+PKG_PROG_PKG_CONFIG
+
# Check for presence of libraries
CHECK_LIBVIRT
CHECK_LIBXML2
CHECK_LIBCU
+CHECK_LIBUUID
CFLAGS_STRICT="-Werror"
diff -r 8b428df21c36 -r 845daca07eed libxkutil/Makefile.am
--- a/libxkutil/Makefile.am Wed Apr 13 12:27:33 2011 -0700
+++ b/libxkutil/Makefile.am Mon May 09 17:12:53 2011 -0300
@@ -1,7 +1,6 @@
# Copyright IBM Corp. 2007
SUBDIRS = tests
-
CFLAGS += $(CFLAGS_STRICT)
noinst_HEADERS = cs_util.h misc_util.h device_parsing.h xmlgen.h infostore.h \
@@ -9,14 +8,14 @@
lib_LTLIBRARIES = libxkutil.la
-AM_LDFLAGS = -lvirt -luuid
-
libxkutil_la_SOURCES = cs_util_instance.c misc_util.c device_parsing.c \
xmlgen.c infostore.c pool_parsing.c
+libxkutil_la_LIBADD = @LIBVIRT_LIBS@ \
+ @LIBUUID_LIBS@
+
noinst_PROGRAMS = xml_parse_test
xml_parse_test_SOURCES = xml_parse_test.c
-xml_parse_test_LDADD = -lvirt
-xml_parse_test_LDFLAGS = libxkutil.la
-xml_parse_test_DEPENDENCIES = libxkutil.la
+xml_parse_test_LDADD = libxkutil.la \
+ @LIBVIRT_LIBS@
diff -r 8b428df21c36 -r 845daca07eed libxkutil/xmlgen.c
--- a/libxkutil/xmlgen.c Wed Apr 13 12:27:33 2011 -0700
+++ b/libxkutil/xmlgen.c Mon May 09 17:12:53 2011 -0300
@@ -22,7 +22,7 @@
#include <string.h>
#include <stdlib.h>
#include <inttypes.h>
-#include <uuid/uuid.h>
+#include <uuid.h>
#include <libxml/tree.h>
#include <libxml/xmlsave.h>
diff -r 8b428df21c36 -r 845daca07eed src/Virt_SettingsDefineCapabilities.c
--- a/src/Virt_SettingsDefineCapabilities.c Wed Apr 13 12:27:33 2011 -0700
+++ b/src/Virt_SettingsDefineCapabilities.c Mon May 09 17:12:53 2011 -0300
@@ -26,7 +26,7 @@
#include <stdbool.h>
#include <sys/vfs.h>
#include <errno.h>
-#include <uuid/uuid.h>
+#include <uuid.h>
#include <libvirt/libvirt.h>
diff -r 8b428df21c36 -r 845daca07eed src/Virt_VSMigrationService.c
--- a/src/Virt_VSMigrationService.c Wed Apr 13 12:27:33 2011 -0700
+++ b/src/Virt_VSMigrationService.c Mon May 09 17:12:53 2011 -0300
@@ -29,7 +29,7 @@
#include <dirent.h>
#include <errno.h>
-#include <uuid/uuid.h>
+#include <uuid.h>
#include <libvirt/libvirt.h>
diff -r 8b428df21c36 -r 845daca07eed src/Virt_VirtualSystemSnapshotService.c
--- a/src/Virt_VirtualSystemSnapshotService.c Wed Apr 13 12:27:33 2011 -0700
+++ b/src/Virt_VirtualSystemSnapshotService.c Mon May 09 17:12:53 2011 -0300
@@ -24,7 +24,7 @@
#include <string.h>
#include <stdbool.h>
-#include <uuid/uuid.h>
+#include <uuid.h>
#include <cmpidt.h>
#include <cmpift.h>
13 years, 3 months
[PATCH 0 of 7] (#3) libcmpiutil: "Cosmetics"
by Eduardo Lima (Etrunko)
Third version of the series, this time with two new patches:
6/7: Removes exec permission from source code files.
7/7: Shuts up automake by defining LEX_OUTPUT_ROOT in configure.ac instead of
Makefile.am.
Best regards,
--
Eduardo de Barros Lima
Software Engineer, Open Virtualization
Linux Technology Center - IBM/Brazil
eblima(a)br.ibm.com
13 years, 3 months
[PATCH] Fix for VirtualSystemManagementService/13_refconfig_additional_devs.py
by Chip Vincent
# HG changeset patch
# User Chip Vincent <cvincent(a)us.ibm.com>
# Date 1305746372 14400
# Node ID 7432d45a1fae6ef499f53a36e24b66df29bcf7f9
# Parent 90f8c9f2388e0563baa311c84024ca41a61e1890
Fix for VirtualSystemManagementService/13_refconfig_additional_devs.py
The cimtest case was failing because libvirt-cim improperly processed graphics devices present in the ReferenceClass parameter in DefineSystem. Rather than overrdiing them, it was appending them. With this patch, the test case now passes and the debug log shows the following correct messages.
Virt_VirtualSystemManagementService.c(1184): graphics = vnc
Virt_VirtualSystemManagementService.c(1326): Overriding device vnc from refconf
Signed-off-by: Chip Vincent <cvincent(a)us.ibm.com>
diff --git a/src/Virt_VirtualSystemManagementService.c b/src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c
+++ b/src/Virt_VirtualSystemManagementService.c
@@ -1162,17 +1162,26 @@
msg = "GraphicsRASD field Address not valid";
goto out;
}
- } else {
+ } else {
CU_DEBUG("Unsupported graphics type %s",
dev->dev.graphics.type);
msg = "Unsupported graphics type";
goto out;
- }
-
- CU_DEBUG("graphics = %s:%s:%s",
- dev->dev.graphics.type,
- dev->dev.graphics.host,
- dev->dev.graphics.port);
+ }
+
+ free(dev->id);
+ if (STREQC(dev->dev.graphics.type, "vnc"))
+ ret = asprintf(&dev->id, "%s", dev->dev.graphics.type);
+ else
+ ret = asprintf(&dev->id, "%s:%s",
+ dev->dev.graphics.type, dev->dev.graphics.port);
+
+ if (ret == -1) {
+ msg = "Failed to create graphics is string";
+ goto out;
+ }
+
+ CU_DEBUG("graphics = %s", dev->id);
out:
return msg;
@@ -1313,9 +1322,6 @@
"DiskResourceAllocationSettingData in a single "
"guest";
- if (dev->type == CIM_RES_TYPE_GRAPHICS)
- continue;
-
if (STREQC(ptr->id, dev->id)) {
CU_DEBUG("Overriding device %s from refconf", ptr->id);
cleanup_virt_device(ptr);
@@ -1425,7 +1431,7 @@
&domain->dev_net_ct);
} else if (type == CIM_RES_TYPE_GRAPHICS) {
struct virt_device dev;
- int ncount = count + domain->dev_graphics_ct;
+ int gcount = count + domain->dev_graphics_ct;
memset(&dev, 0, sizeof(dev));
msg = rasd_to_vdev(inst,
@@ -1435,7 +1441,7 @@
if (msg == NULL)
msg = add_device_nodup(&dev,
domain->dev_graphics,
- ncount,
+ gcount,
&domain->dev_graphics_ct);
} else if (type == CIM_RES_TYPE_INPUT) {
domain->dev_input_ct = 1;
13 years, 3 months
[PATCH] [TEST] Update Graphics RASD tests to handle new InstanceIDs
by Chip Vincent
# HG changeset patch
# User Chip Vincent <cvincent(a)us.ibm.com>
# Date 1305740945 14400
# Node ID d6951b8799a80d0e5b3639b6f75da405c32a9a77
# Parent 4c8e0c673d796ae7a5e17ee771d935e449b77bce
[TEST] Update Graphics RASD tests to handle new InstanceIDs
Graphics RASDs now include support for serial/consoel devices, which includes support for unqiue InstanceIDs. This patch updates the test to look for <vm_name>/vnc where is used to just look for graphics.
NOTE: VirtualSystemManagementService/13_refconfig_additional_devs.py fails due to a problem in libvirt-cim. Seperate patch to follow shortly.
Signed-off-by: Chip Vincent <cvincent(a)us.ibm.com>
diff --git a/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py b/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py
+++ b/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py
@@ -147,7 +147,7 @@
curr_cim_rev, changeset = get_provider_version(options.virt, options.ip)
if curr_cim_rev >= input_graphics_pool_rev:
keys['InputResourceAllocationSettingData'] = input_device
- keys['GraphicsResourceAllocationSettingData'] = "%s/graphics" % test_dom
+ keys['GraphicsResourceAllocationSettingData'] = "%s/vnc" % test_dom
ret = cxml.cim_define(options.ip)
if not ret:
diff --git a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py
--- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py
+++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py
@@ -144,7 +144,7 @@
display = {
'SystemName' : test_dom,
'CreationClassName' : display_inst,
- 'DeviceID' : "%s/%s" % (test_dom, "graphics"),
+ 'DeviceID' : "%s/%s" % (test_dom, "vnc"),
}
point = {
diff --git a/suites/libvirt-cim/cimtest/KVMRedirectionSAP/02_ipv6_support.py b/suites/libvirt-cim/cimtest/KVMRedirectionSAP/02_ipv6_support.py
--- a/suites/libvirt-cim/cimtest/KVMRedirectionSAP/02_ipv6_support.py
+++ b/suites/libvirt-cim/cimtest/KVMRedirectionSAP/02_ipv6_support.py
@@ -92,7 +92,7 @@
if not ret:
raise Exception("Failed to define the dom: %s" % test_dom)
- devid = "%s/%s" % (test_dom, 'graphics')
+ devid = "%s/%s" % (test_dom, 'vnc')
vnc = get_typed_class(virt, "DisplayController")
key_list = { 'DeviceID' : devid,
'CreationClassName' : vnc,
diff --git a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
--- a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
+++ b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
@@ -118,7 +118,7 @@
curr_cim_rev, changeset = get_provider_version(virt, server)
if curr_cim_rev >= input_graphics_pool_rev:
graphics_cn = get_typed_class(virt, "DisplayController")
- exp_pllist[graphics_cn] = ['%s/graphics' % test_dom]
+ exp_pllist[graphics_cn] = ['%s/vnc' % test_dom]
try:
diff --git a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/20_verify_vnc_password.py b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/20_verify_vnc_password.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/20_verify_vnc_password.py
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/20_verify_vnc_password.py
@@ -49,7 +49,7 @@
classname, len(rasd_list))
return FAIL
- inst_id = "%s/graphics" % default_dom
+ inst_id = "%s/vnc" % default_dom
for rasd in rasd_list:
# Verify the Password for the domain is set
if rasd['InstanceID'] == inst_id:
diff --git a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py
@@ -100,7 +100,7 @@
rlist.append(input)
rlist.append(graphics)
prop_list[input] = "%s/%s" % (test_dom, input_device)
- prop_list[graphics] = "%s/%s" % (test_dom, "graphics")
+ prop_list[graphics] = "%s/%s" % (test_dom, "vnc")
if virt == 'LXC':
prop_list = {rlist[1] : "%s/%s" % (test_dom, "mem")}
diff --git a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
@@ -95,7 +95,7 @@
"disk_rasd" : '%s/%s' %(test_dom, test_disk),
"mem_rasd" : '%s/%s' %(test_dom, "mem"),
"input_rasd": '%s/%s' %(test_dom, input_device),
- "grap_rasd" : '%s/%s' %(test_dom, "graphics")
+ "grap_rasd" : '%s/%s' %(test_dom, "vnc")
}
diff --git a/suites/libvirt-cim/lib/XenKvmLib/rasd.py b/suites/libvirt-cim/lib/XenKvmLib/rasd.py
--- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py
+++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py
@@ -110,7 +110,7 @@
"VirtualQuantity" : (t_mem * 1024),
},
dc_cn : {
- "InstanceID" : "%s/%s" %(t_dom, "graphics")
+ "InstanceID" : "%s/%s" %(t_dom, "vnc")
},
pd_cn : {
"InstanceID" : point_device
13 years, 3 months
[PATCH] (#3) Fix connection leaks
by Sharad Mishra
# HG changeset patch
# User Sharad Mishra <snmishra(a)us.ibm.com>
# Date 1305736505 25200
# Node ID 846303186ec24f6d514a76224dd3ba921232ba52
# Parent 8b428df21c360d1eaedba7157b0dfd429d2db121
(#3) Fix connection leaks.
libvirt-cim had few connection leaks which were causing it to crash.
Signed-off-by: Sharad Mishra <snmishra(a)us.ibm.com>
#2 - cimtest showed another leak, which was fixed in this version.
#3 - Review comments to move and rename dom2 - virDomainPtr to _dom.
Move virConnectClose during migration to migrate_do.
diff -r 8b428df21c36 -r 846303186ec2 libxkutil/pool_parsing.c
--- a/libxkutil/pool_parsing.c Wed Apr 13 12:27:33 2011 -0700
+++ b/libxkutil/pool_parsing.c Wed May 18 09:35:05 2011 -0700
@@ -453,6 +453,7 @@
CU_DEBUG("Unable to refresh storage "
"pool");
}
+ virStoragePoolFree(pool_ptr);
ret = 1;
}
diff -r 8b428df21c36 -r 846303186ec2 src/Virt_AllocationCapabilities.c
--- a/src/Virt_AllocationCapabilities.c Wed Apr 13 12:27:33 2011 -0700
+++ b/src/Virt_AllocationCapabilities.c Wed May 18 09:35:05 2011 -0700
@@ -79,7 +79,6 @@
const char *id,
struct inst_list *list)
{
- virConnectPtr conn = NULL;
CMPIInstance *alloc_cap_inst;
struct inst_list device_pool_list;
CMPIStatus s = {CMPI_RC_OK, NULL};
@@ -91,15 +90,6 @@
if (!provider_is_responsible(broker, ref, &s))
goto out;
- conn = connect_by_classname(broker, CLASSNAME(ref), &s);
- if (conn == NULL) {
- if (id)
- cu_statusf(broker, &s,
- CMPI_RC_ERR_NOT_FOUND,
- "Instance not found.");
- goto out;
- }
-
s = enum_pools(broker, ref, CIM_RES_TYPE_ALL, &device_pool_list);
if (s.rc != CMPI_RC_OK) {
cu_statusf(broker, &s,
@@ -141,7 +131,6 @@
}
out:
- virConnectClose(conn);
inst_list_free(&device_pool_list);
return s;
diff -r 8b428df21c36 -r 846303186ec2 src/Virt_ComputerSystem.c
--- a/src/Virt_ComputerSystem.c Wed Apr 13 12:27:33 2011 -0700
+++ b/src/Virt_ComputerSystem.c Wed May 18 09:35:05 2011 -0700
@@ -907,6 +907,7 @@
{
int ret;
virConnectPtr conn = NULL;
+ virDomainPtr _dom = NULL;
char *xml = NULL;
CMPIStatus s = {CMPI_RC_OK, NULL};
@@ -938,12 +939,12 @@
goto out;
}
- dom = virDomainLookupByName(conn,
+ _dom = virDomainLookupByName(conn,
virDomainGetName(dom));
- if (dom == NULL) {
- dom = virDomainDefineXML(conn, xml);
- if (dom == NULL) {
+ if (_dom == NULL) {
+ _dom = virDomainDefineXML(conn, xml);
+ if (_dom == NULL) {
CU_DEBUG("Failed to define domain from XML");
virt_set_status(_BROKER, &s,
CMPI_RC_ERR_FAILED,
@@ -953,10 +954,10 @@
}
}
- if (!domain_online(dom))
+ if (!domain_online(_dom))
CU_DEBUG("Guest is now offline");
- ret = virDomainCreate(dom);
+ ret = virDomainCreate(_dom);
if (ret != 0)
virt_set_status(_BROKER, &s,
CMPI_RC_ERR_FAILED,
@@ -965,6 +966,7 @@
out:
free(xml);
+ virDomainFree(_dom);
return s;
}
diff -r 8b428df21c36 -r 846303186ec2 src/Virt_ComputerSystemIndication.c
--- a/src/Virt_ComputerSystemIndication.c Wed Apr 13 12:27:33 2011 -0700
+++ b/src/Virt_ComputerSystemIndication.c Wed May 18 09:35:05 2011 -0700
@@ -422,7 +422,6 @@
}
static bool async_ind(CMPIContext *context,
- virConnectPtr conn,
int ind_type,
struct dom_xml prev_dom,
char *prefix,
@@ -557,7 +556,7 @@
for (i = 0; i < cur_count; i++) {
res = dom_in_list(cur_xml[i].uuid, prev_count, prev_xml);
if (!res)
- async_ind(context, conn, CS_CREATED,
+ async_ind(context, CS_CREATED,
cur_xml[i], prefix, args);
}
@@ -565,14 +564,14 @@
for (i = 0; i < prev_count; i++) {
res = dom_in_list(prev_xml[i].uuid, cur_count, cur_xml);
if (!res)
- async_ind(context, conn, CS_DELETED,
+ async_ind(context, CS_DELETED,
prev_xml[i], prefix, args);
}
for (i = 0; i < prev_count; i++) {
res = dom_changed(prev_xml[i], cur_xml, cur_count);
if (res) {
- async_ind(context, conn, CS_MODIFIED,
+ async_ind(context, CS_MODIFIED,
prev_xml[i], prefix, args);
}
diff -r 8b428df21c36 -r 846303186ec2 src/Virt_DevicePool.c
--- a/src/Virt_DevicePool.c Wed Apr 13 12:27:33 2011 -0700
+++ b/src/Virt_DevicePool.c Wed May 18 09:35:05 2011 -0700
@@ -451,8 +451,8 @@
free(host);
free(dev);
+ virDomainFree(dom);
virConnectClose(conn);
- virDomainFree(dom);
return pool;
}
diff -r 8b428df21c36 -r 846303186ec2 src/Virt_VSMigrationService.c
--- a/src/Virt_VSMigrationService.c Wed Apr 13 12:27:33 2011 -0700
+++ b/src/Virt_VSMigrationService.c Wed May 18 09:35:05 2011 -0700
@@ -1294,7 +1294,6 @@
"Completed");
raise_deleted_ind(job);
- virConnectClose(job->conn);
free(job->domain);
free(job->ref_cn);
free(job->ref_ns);
@@ -1511,6 +1510,7 @@
out:
CMReturnData(results, (CMPIValue *)&retcode, CMPI_uint32);
+ virConnectClose(job->conn);
return s;
}
13 years, 3 months
[PATCH] (#2) Fix connection leaks
by Sharad Mishra
# HG changeset patch
# User Sharad Mishra <snmishra(a)us.ibm.com>
# Date 1305650840 25200
# Node ID e780814a3ab17bd84c0f69dfb2fa0a4f5bc8efab
# Parent 8b428df21c360d1eaedba7157b0dfd429d2db121
(#2) Fix connection leaks.
libvirt-cim had few connection leaks which were causing it to crash.
Signed-off-by: Sharad Mishra <snmishra(a)us.ibm.com>
#2 - cimtest showed another leak, which was fixed in this version.
diff -r 8b428df21c36 -r e780814a3ab1 libxkutil/pool_parsing.c
--- a/libxkutil/pool_parsing.c Wed Apr 13 12:27:33 2011 -0700
+++ b/libxkutil/pool_parsing.c Tue May 17 09:47:20 2011 -0700
@@ -453,6 +453,7 @@
CU_DEBUG("Unable to refresh storage "
"pool");
}
+ virStoragePoolFree(pool_ptr);
ret = 1;
}
diff -r 8b428df21c36 -r e780814a3ab1 src/Virt_AllocationCapabilities.c
--- a/src/Virt_AllocationCapabilities.c Wed Apr 13 12:27:33 2011 -0700
+++ b/src/Virt_AllocationCapabilities.c Tue May 17 09:47:20 2011 -0700
@@ -79,7 +79,6 @@
const char *id,
struct inst_list *list)
{
- virConnectPtr conn = NULL;
CMPIInstance *alloc_cap_inst;
struct inst_list device_pool_list;
CMPIStatus s = {CMPI_RC_OK, NULL};
@@ -91,15 +90,6 @@
if (!provider_is_responsible(broker, ref, &s))
goto out;
- conn = connect_by_classname(broker, CLASSNAME(ref), &s);
- if (conn == NULL) {
- if (id)
- cu_statusf(broker, &s,
- CMPI_RC_ERR_NOT_FOUND,
- "Instance not found.");
- goto out;
- }
-
s = enum_pools(broker, ref, CIM_RES_TYPE_ALL, &device_pool_list);
if (s.rc != CMPI_RC_OK) {
cu_statusf(broker, &s,
@@ -141,7 +131,6 @@
}
out:
- virConnectClose(conn);
inst_list_free(&device_pool_list);
return s;
diff -r 8b428df21c36 -r e780814a3ab1 src/Virt_ComputerSystem.c
--- a/src/Virt_ComputerSystem.c Wed Apr 13 12:27:33 2011 -0700
+++ b/src/Virt_ComputerSystem.c Tue May 17 09:47:20 2011 -0700
@@ -938,12 +938,12 @@
goto out;
}
- dom = virDomainLookupByName(conn,
+ virDomainPtr dom2 = virDomainLookupByName(conn,
virDomainGetName(dom));
- if (dom == NULL) {
- dom = virDomainDefineXML(conn, xml);
- if (dom == NULL) {
+ if (dom2 == NULL) {
+ dom2 = virDomainDefineXML(conn, xml);
+ if (dom2 == NULL) {
CU_DEBUG("Failed to define domain from XML");
virt_set_status(_BROKER, &s,
CMPI_RC_ERR_FAILED,
@@ -953,10 +953,10 @@
}
}
- if (!domain_online(dom))
+ if (!domain_online(dom2))
CU_DEBUG("Guest is now offline");
- ret = virDomainCreate(dom);
+ ret = virDomainCreate(dom2);
if (ret != 0)
virt_set_status(_BROKER, &s,
CMPI_RC_ERR_FAILED,
@@ -965,6 +965,7 @@
out:
free(xml);
+ virDomainFree(dom2);
return s;
}
diff -r 8b428df21c36 -r e780814a3ab1 src/Virt_ComputerSystemIndication.c
--- a/src/Virt_ComputerSystemIndication.c Wed Apr 13 12:27:33 2011 -0700
+++ b/src/Virt_ComputerSystemIndication.c Tue May 17 09:47:20 2011 -0700
@@ -422,7 +422,6 @@
}
static bool async_ind(CMPIContext *context,
- virConnectPtr conn,
int ind_type,
struct dom_xml prev_dom,
char *prefix,
@@ -557,7 +556,7 @@
for (i = 0; i < cur_count; i++) {
res = dom_in_list(cur_xml[i].uuid, prev_count, prev_xml);
if (!res)
- async_ind(context, conn, CS_CREATED,
+ async_ind(context, CS_CREATED,
cur_xml[i], prefix, args);
}
@@ -565,14 +564,14 @@
for (i = 0; i < prev_count; i++) {
res = dom_in_list(prev_xml[i].uuid, cur_count, cur_xml);
if (!res)
- async_ind(context, conn, CS_DELETED,
+ async_ind(context, CS_DELETED,
prev_xml[i], prefix, args);
}
for (i = 0; i < prev_count; i++) {
res = dom_changed(prev_xml[i], cur_xml, cur_count);
if (res) {
- async_ind(context, conn, CS_MODIFIED,
+ async_ind(context, CS_MODIFIED,
prev_xml[i], prefix, args);
}
diff -r 8b428df21c36 -r e780814a3ab1 src/Virt_DevicePool.c
--- a/src/Virt_DevicePool.c Wed Apr 13 12:27:33 2011 -0700
+++ b/src/Virt_DevicePool.c Tue May 17 09:47:20 2011 -0700
@@ -451,8 +451,8 @@
free(host);
free(dev);
+ virDomainFree(dom);
virConnectClose(conn);
- virDomainFree(dom);
return pool;
}
diff -r 8b428df21c36 -r e780814a3ab1 src/Virt_VSMigrationService.c
--- a/src/Virt_VSMigrationService.c Wed Apr 13 12:27:33 2011 -0700
+++ b/src/Virt_VSMigrationService.c Tue May 17 09:47:20 2011 -0700
@@ -1511,6 +1511,7 @@
out:
CMReturnData(results, (CMPIValue *)&retcode, CMPI_uint32);
+ virConnectClose(job->conn);
return s;
}
13 years, 3 months
[PATCH] Ensure graphics devices have unique IDs
by Chip Vincent
# HG changeset patch
# User Chip Vincent <cvincent(a)us.ibm.com>
# Date 1305131981 14400
# Node ID 90f8c9f2388e0563baa311c84024ca41a61e1890
# Parent 8b428df21c360d1eaedba7157b0dfd429d2db121
Ensure graphics devices have unique IDs
Now that multiple graphics device types are supported, it important that they have unique names that are consistent over time. This patch updates the graphics->id to replace 'graphics' with <graphics_type> for vnc and <graphics_type>:<port> for serial/console. The port is ommitted from vnc connections because it changes when VM started if autoport is enabled and only one connection is currently supported. The source path is ommitted from serial/console connections because it is present only when the VM is running. Since libvirt limits the number of serial/console pty resources and ensures they have unique ports, the source path is not necessary to ensure consistent unique names.
Examples of new graphics id format:
InstanceID="test_domain/serial:0"
InstanceID="test_domain/serial:1"
InstanceID="test_domain/console:0"
InstanceID="test_domain/vnc"
Signed-off-by: Chip Vincent <cvincent(a)us.ibm.com>
diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c
+++ b/libxkutil/device_parsing.c
@@ -503,6 +503,7 @@
struct virt_device *vdev = NULL;
struct graphics_device *gdev = NULL;
xmlNode *child = NULL;
+ int ret;
vdev = calloc(1, sizeof(*vdev));
if (vdev == NULL)
@@ -547,14 +548,16 @@
}
vdev->type = CIM_RES_TYPE_GRAPHICS;
- vdev->id = strdup("graphics");
+
+ if (STREQC(gdev->type, "vnc"))
+ ret = asprintf(&vdev->id, "%s", gdev->type);
+ else
+ ret = asprintf(&vdev->id, "%s:%s", gdev->type, gdev->port);
- /* FIXME: IDs should be unique, but that breaks existing tests.
- ret = asprintf(&vdev->id, "graphics:%s", gdev->type);
- if(ret == -1) {
+ if (ret == -1) {
CU_DEBUG("Failed to create graphics is string");
goto err;
- } */
+ }
*vdevs = vdev;
13 years, 3 months