diff --git a/ChangeLog b/ChangeLog index e4cc571861..a7987d851c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Mon Jul 3 13:54:03 EDT 2006 Daniel Veillard + + * libvirt.spec.in proxy/Makefile.am src/proxy_internal.c + src/xen_internal.c: fixing the proxy installation, integrate in + the spec file and fix a few bugs in the proxy, seems to behave + correctly now. + * docs/apibuild.py docs/*: fixing the doc and API generator + Mon Jul 3 11:21:10 EDT 2006 Daniel Veillard * proxy/libvirt_proxy.c src/proxy_internal.[ch] src/xend_internal.[ch]: diff --git a/docs/APIconstructors.html b/docs/APIconstructors.html index 4a06dee9bc..3349078b76 100644 --- a/docs/APIconstructors.html +++ b/docs/APIconstructors.html @@ -1,3 +1,15 @@ -List of constructors for libvirt

List of constructors for libvirt

+List of constructors for libvirt diff --git a/docs/APIfiles.html b/docs/APIfiles.html index 46bbda4081..cdc8636d9c 100644 --- a/docs/APIfiles.html +++ b/docs/APIfiles.html @@ -1,3 +1,132 @@ -List of Symbols per Module for libvirt

List of Symbols per Module for libvirt

+List of Symbols per Module for libvirt

List of Symbols per Module for libvirt

Module libvirt:

LIBVIR_VERSION_NUMBER
+VIR_DEVICE_DEFAULT
+VIR_DEVICE_RO
+VIR_DEVICE_RW
+VIR_DEVICE_RW_FORCE
+VIR_DOMAIN_BLOCKED
+VIR_DOMAIN_CRASHED
+VIR_DOMAIN_DESTROY
+VIR_DOMAIN_NONE
+VIR_DOMAIN_NOSTATE
+VIR_DOMAIN_PAUSED
+VIR_DOMAIN_PRESERVE
+VIR_DOMAIN_RENAME_RESTART
+VIR_DOMAIN_RESTART
+VIR_DOMAIN_RUNNING
+VIR_DOMAIN_SHUTDOWN
+VIR_DOMAIN_SHUTOFF
+_virDomainInfo
+_virDomainKernel
+_virNodeInfo
+virConnect
+virConnectClose
+virConnectGetType
+virConnectGetVersion
+virConnectListDefinedDomains
+virConnectListDomains
+virConnectNumOfDomains
+virConnectOpen
+virConnectOpenReadOnly
+virConnectPtr
+virDeviceMode
+virDomain
+virDomainCreate
+virDomainCreateFlags
+virDomainCreateLinux
+virDomainDefineXML
+virDomainDestroy
+virDomainFree
+virDomainGetID
+virDomainGetInfo
+virDomainGetMaxMemory
+virDomainGetName
+virDomainGetOSType
+virDomainGetUUID
+virDomainGetUUIDString
+virDomainGetXMLDesc
+virDomainInfo
+virDomainInfoPtr
+virDomainKernel
+virDomainKernelPtr
+virDomainLookupByID
+virDomainLookupByName
+virDomainLookupByUUID
+virDomainLookupByUUIDString
+virDomainPtr
+virDomainReboot
+virDomainRestart
+virDomainRestore
+virDomainResume
+virDomainSave
+virDomainSetMaxMemory
+virDomainSetMemory
+virDomainShutdown
+virDomainState
+virDomainSuspend
+virDomainUndefine
+virGetVersion
+virInitialize
+virNodeGetInfo
+virNodeInfo
+virNodeInfoPtr
+

Module virterror:

VIR_ERR_CALL_FAILED
+VIR_ERR_DOM_EXIST
+VIR_ERR_DRIVER_FULL
+VIR_ERR_ERROR
+VIR_ERR_GET_FAILED
+VIR_ERR_HTTP_ERROR
+VIR_ERR_INTERNAL_ERROR
+VIR_ERR_INVALID_ARG
+VIR_ERR_INVALID_CONN
+VIR_ERR_INVALID_DOMAIN
+VIR_ERR_NONE
+VIR_ERR_NO_CONNECT
+VIR_ERR_NO_DEVICE
+VIR_ERR_NO_KERNEL
+VIR_ERR_NO_MEMORY
+VIR_ERR_NO_NAME
+VIR_ERR_NO_OS
+VIR_ERR_NO_ROOT
+VIR_ERR_NO_SOURCE
+VIR_ERR_NO_SUPPORT
+VIR_ERR_NO_TARGET
+VIR_ERR_NO_XEN
+VIR_ERR_NO_XENSTORE
+VIR_ERR_OK
+VIR_ERR_OPERATION_FAILED
+VIR_ERR_OS_TYPE
+VIR_ERR_POST_FAILED
+VIR_ERR_SEXPR_SERIAL
+VIR_ERR_UNKNOWN_HOST
+VIR_ERR_WARNING
+VIR_ERR_XEN_CALL
+VIR_ERR_XML_ERROR
+VIR_FROM_DOM
+VIR_FROM_NONE
+VIR_FROM_PROXY
+VIR_FROM_RPC
+VIR_FROM_SEXPR
+VIR_FROM_XEN
+VIR_FROM_XEND
+VIR_FROM_XENSTORE
+VIR_FROM_XML
+_virError
+virConnCopyLastError
+virConnGetLastError
+virConnResetLastError
+virConnSetErrorFunc
+virCopyLastError
+virDefaultErrorFunc
+virError
+virErrorDomain
+virErrorFunc
+virErrorLevel
+virErrorNumber
+virErrorPtr
+virGetLastError
+virResetError
+virResetLastError
+virSetErrorFunc
+

diff --git a/docs/APIfunctions.html b/docs/APIfunctions.html index d933072ee2..0bebb89495 100644 --- a/docs/APIfunctions.html +++ b/docs/APIfunctions.html @@ -1,3 +1,62 @@ -List of function manipulating types in libvirt

List of function manipulating types in libvirt

+List of function manipulating types in libvirt

diff --git a/docs/APIsymbols.html b/docs/APIsymbols.html index 3742cd669b..af3c51cdad 100644 --- a/docs/APIsymbols.html +++ b/docs/APIsymbols.html @@ -1,3 +1,132 @@ -Alphabetic List of Symbols in libvirt

Alphabetic List of Symbols in libvirt

+Alphabetic List of Symbols in libvirt

Alphabetic List of Symbols in libvirt

Letter L:

LIBVIR_VERSION_NUMBER
+

Letter V:

VIR_DEVICE_DEFAULT
+VIR_DEVICE_RO
+VIR_DEVICE_RW
+VIR_DEVICE_RW_FORCE
+VIR_DOMAIN_BLOCKED
+VIR_DOMAIN_CRASHED
+VIR_DOMAIN_DESTROY
+VIR_DOMAIN_NONE
+VIR_DOMAIN_NOSTATE
+VIR_DOMAIN_PAUSED
+VIR_DOMAIN_PRESERVE
+VIR_DOMAIN_RENAME_RESTART
+VIR_DOMAIN_RESTART
+VIR_DOMAIN_RUNNING
+VIR_DOMAIN_SHUTDOWN
+VIR_DOMAIN_SHUTOFF
+VIR_ERR_CALL_FAILED
+VIR_ERR_DOM_EXIST
+VIR_ERR_DRIVER_FULL
+VIR_ERR_ERROR
+VIR_ERR_GET_FAILED
+VIR_ERR_HTTP_ERROR
+VIR_ERR_INTERNAL_ERROR
+VIR_ERR_INVALID_ARG
+VIR_ERR_INVALID_CONN
+VIR_ERR_INVALID_DOMAIN
+VIR_ERR_NONE
+VIR_ERR_NO_CONNECT
+VIR_ERR_NO_DEVICE
+VIR_ERR_NO_KERNEL
+VIR_ERR_NO_MEMORY
+VIR_ERR_NO_NAME
+VIR_ERR_NO_OS
+VIR_ERR_NO_ROOT
+VIR_ERR_NO_SOURCE
+VIR_ERR_NO_SUPPORT
+VIR_ERR_NO_TARGET
+VIR_ERR_NO_XEN
+VIR_ERR_NO_XENSTORE
+VIR_ERR_OK
+VIR_ERR_OPERATION_FAILED
+VIR_ERR_OS_TYPE
+VIR_ERR_POST_FAILED
+VIR_ERR_SEXPR_SERIAL
+VIR_ERR_UNKNOWN_HOST
+VIR_ERR_WARNING
+VIR_ERR_XEN_CALL
+VIR_ERR_XML_ERROR
+VIR_FROM_DOM
+VIR_FROM_NONE
+VIR_FROM_PROXY
+VIR_FROM_RPC
+VIR_FROM_SEXPR
+VIR_FROM_XEN
+VIR_FROM_XEND
+VIR_FROM_XENSTORE
+VIR_FROM_XML
+

Letter _:

_virDomainInfo
+_virDomainKernel
+_virError
+_virNodeInfo
+

Letter v:

virConnCopyLastError
+virConnGetLastError
+virConnResetLastError
+virConnSetErrorFunc
+virConnect
+virConnectClose
+virConnectGetType
+virConnectGetVersion
+virConnectListDefinedDomains
+virConnectListDomains
+virConnectNumOfDomains
+virConnectOpen
+virConnectOpenReadOnly
+virConnectPtr
+virCopyLastError
+virDefaultErrorFunc
+virDeviceMode
+virDomain
+virDomainCreate
+virDomainCreateFlags
+virDomainCreateLinux
+virDomainDefineXML
+virDomainDestroy
+virDomainFree
+virDomainGetID
+virDomainGetInfo
+virDomainGetMaxMemory
+virDomainGetName
+virDomainGetOSType
+virDomainGetUUID
+virDomainGetUUIDString
+virDomainGetXMLDesc
+virDomainInfo
+virDomainInfoPtr
+virDomainKernel
+virDomainKernelPtr
+virDomainLookupByID
+virDomainLookupByName
+virDomainLookupByUUID
+virDomainLookupByUUIDString
+virDomainPtr
+virDomainReboot
+virDomainRestart
+virDomainRestore
+virDomainResume
+virDomainSave
+virDomainSetMaxMemory
+virDomainSetMemory
+virDomainShutdown
+virDomainState
+virDomainSuspend
+virDomainUndefine
+virError
+virErrorDomain
+virErrorFunc
+virErrorLevel
+virErrorNumber
+virErrorPtr
+virGetLastError
+virGetVersion
+virInitialize
+virNodeGetInfo
+virNodeInfo
+virNodeInfoPtr
+virResetError
+virResetLastError
+virSetErrorFunc
+

diff --git a/docs/apibuild.py b/docs/apibuild.py index 5d173023a6..96752eb9de 100755 --- a/docs/apibuild.py +++ b/docs/apibuild.py @@ -25,6 +25,8 @@ ignored_files = { "driver.h": "internal driver interfaces", "xend_internal.h": "internal includes and defines", "xend_internal.c": "internal code", + "proxy_internal.h": "internal includes and defines", + "proxy_internal.c": "internal code", "xen_internal.h": "internal includes and defines", "xen_internal.c": "internal code", "xs_internal.h": "internal includes and defines", @@ -2086,11 +2088,11 @@ def rebuild(): builder = None if glob.glob("../src/libvirt.c") != [] : print "Rebuilding API description for libvirt" - builder = docBuilder("libvirt", ["../src", "../include"], + builder = docBuilder("libvirt", ["../src", "../include/libvirt"], []) elif glob.glob("src/libvirt.c") != [] : print "Rebuilding API description for libvir" - builder = docBuilder("libvirt", ["src", "include"], + builder = docBuilder("libvirt", ["src", "include/libvirt"], []) else: print "rebuild() failed, unable to guess the module" diff --git a/docs/devhelp/general.html b/docs/devhelp/general.html index 62aedf69bc..998f2b18a6 100644 --- a/docs/devhelp/general.html +++ b/docs/devhelp/general.html @@ -22,12 +22,17 @@ Home + + + Next + + libvirt Reference Manual

libvirt API Modules

-

+

libvirt - core interfaces for the libvirt library
virterror - error handling interfaces for the libvirt library

diff --git a/docs/devhelp/libvirt-virterror.html b/docs/devhelp/libvirt-virterror.html index 36a129b6d8..d775372311 100644 --- a/docs/devhelp/libvirt-virterror.html +++ b/docs/devhelp/libvirt-virterror.html @@ -86,7 +86,8 @@ void virConnResetLastError (VIR_FROM_SEXPR = 4 /* Error in the S-Epression code */ VIR_FROM_XML = 5 /* Error in the XML code */ VIR_FROM_DOM = 6 /* Error when operating on a domain */ - VIR_FROM_RPC = 7 /* Error in the XML-RPC code */ + VIR_FROM_RPC = 7 /* Error in the XML-RPC code */ + VIR_FROM_PROXY = 8 /* Error in the proxy code */ };

diff --git a/docs/libvirt-api.xml b/docs/libvirt-api.xml index 1e7563fc59..9226657513 100644 --- a/docs/libvirt-api.xml +++ b/docs/libvirt-api.xml @@ -1,7 +1,533 @@ + +

core interfaces for the libvirt library + Provides the interfaces of the libvirt library to handle Xen domains from a process running in domain 0 + Daniel Veillard <veillard@redhat.com> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + error handling interfaces for the libvirt library + Provides the interfaces of the libvirt library to handle errors raised while using the library. + Daniel Veillard <veillard@redhat.com> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Macro providing the version of the library as version * 1,000,000 + minor * 1000 + micro + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + a virConnectPtr is pointer to a virConnect private structure, this is the type used to reference a connection to the Xen Hypervisor in the API. + + + + + + + + + + + + + a virDomainInfoPtr is a pointer to a virDomainInfo structure. + + + + + + + + + a virDomainKernelPtr is a pointer to a virDomainKernel structure. + + + a virDomainPtr is pointer to a virDomain private structure, this is the type used to reference a Xen domain in the API. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + a virNodeInfoPtr is a pointer to a virNodeInfo structure. + + + Copy the content of the last error caught on that connection One will need to free the result with virResetError() + + + + + + Provide a pointer to the last error caught on that connection Simpler but may not be suitable for multithreaded accesses, in which case use virConnCopyLastError() + + + + + Reset the last error caught on that connection + + + + + Set a connection error handling function, if @handler is NULL it will reset to default which is to pass error back to the global library handler. + + + + + + + This function closes the connection to the Hypervisor. This should not be called if further interaction with the Hypervisor are needed especially if there is running domain which need further monitoring by the application. + + + + + Get the name of the Hypervisor software used. + + + + + Get the version level of the Hypervisor running. This may work only with hypervisor call, i.e. with priviledged access to the hypervisor, not with a Read-Only connection. + + + + + + list the defined domains, stores the pointers to the names in @names + + + + + + + Collect the list of active domains, and store their ID in @maxids + + + + + + + Provides the number of active domains. + + + + + This function should be called first to get a connection to the Hypervisor and xen store + + + + + This function should be called first to get a restricted connection to the libbrary functionalities. The set of APIs usable are then restricted on the available methods to control the domains. + + + + + Copy the content of the last error caught at the library level One will need to free the result with virResetError() + + + + + Default routine reporting an error to stderr. + + + + + launch a defined domain. If the call succeed the domain moves from the defined to the running domains pools. + + + + + Launch a new Linux guest domain, based on an XML description similar to the one returned by virDomainGetXMLDesc() This function may requires priviledged access to the hypervisor. + + + + + + + define a domain, but does not start it + + + + + + Destroy the domain object. The running instance is shutdown if not down already and all resources used by it are given back to the hypervisor. The data structure is freed and should not be used thereafter if the call does not return an error. This function may requires priviledged access + + + + + Free the domain object. The running instance is kept alive. The data structure is freed and should not be used thereafter. + + + + + Get the hypervisor ID number for the domain + + + + + Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the informations can be extracted. + + + + + + Retrieve the maximum amount of physical memory allocated to a domain. If domain is NULL, then this get the amount of memory reserved to Domain0 i.e. the domain where the application runs. + + + + + Get the public name for that domain + + + + + Get the type of domain operation system. + + + + + Get the UUID for a domain + + + + + + Get the UUID for a domain as string. For more information about UUID see RFC4122. + + + + + + Provide an XML description of the domain. The description may be reused later to relaunch the domain with virDomainCreateLinux(). + + + + + + Try to find a domain based on the hypervisor ID number + + + + + + Try to lookup a domain on the given hypervisor based on its name. + + + + + + Try to lookup a domain on the given hypervisor based on its UUID. + + + + + + Try to lookup a domain on the given hypervisor based on its UUID. + + + + + + Reboot a domain, the domain object is still usable there after but the domain OS is being stopped for a restart. Note that the guest OS may ignore the request. + + + + + + This method will restore a domain saved to disk by virDomainSave(). + + + + + + Resume an suspended domain, the process is restarted from the state where it was frozen by calling virSuspendDomain(). This function may requires priviledged access + + + + + This method will suspend a domain and save its memory contents to a file on disk. After the call, if successful, the domain is not listed as running anymore (this may be a problem). Use virDomainRestore() to restore a domain after saving. + + + + + + Dynamically change the maximum amount of physical memory allocated to a domain. If domain is NULL, then this change the amount of memory reserved to Domain0 i.e. the domain where the application runs. This function requires priviledged access to the hypervisor. + + + + + + Dynamically change the target amount of physical memory allocated to a domain. If domain is NULL, then this change the amount of memory reserved to Domain0 i.e. the domain where the application runs. This function may requires priviledged access to the hypervisor. + + + + + + Shutdown a domain, the domain object is still usable there after but the domain OS is being stopped. Note that the guest OS may ignore the request. TODO: should we add an option for reboot, knowing it may not be doable in the general case ? + + + + + Suspends an active domain, the process is frozen without further access to CPU resources and I/O but the memory used by the domain at the hypervisor level will stay allocated. Use virDomainResume() to reactivate the domain. This function may requires priviledged access. + + + + + undefine a domain but does not stop it if it is running + + + + + Signature of a function to use when there is an error raised by the library. + + + + + + Provide a pointer to the last error caught at the library level Simpler but may not be suitable for multithreaded accesses, in which case use virCopyLastError() + + + + Provides two information back, @libVer is the version of the library while @typeVer will be the version of the hypervisor type @type against which the library was compiled. If @type is NULL, "Xen" is assumed, if @type is unknown or not availble, an error code will be returned and @typeVer will be 0. + + + + + + + Initialize the library. It's better to call this routine at startup in multithreaded applications to avoid potential race when initializing the library. + + + + Extract hardware information about the node. + + + + + + Reset the error being pointed to + + + + + Reset the last error caught at the library level. + + + + Set a library global error handling function, if @handler is NULL, it will reset to default printing on stderr. The error raised there are those for which no handler at the connection level could caught. + + + + diff --git a/docs/libvirt-refs.xml b/docs/libvirt-refs.xml index 532865ea36..1ec457890f 100644 --- a/docs/libvirt-refs.xml +++ b/docs/libvirt-refs.xml @@ -1,15 +1,2187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libvirt.spec.in b/libvirt.spec.in index 3233464f65..7ec8d2b5f8 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -75,6 +75,7 @@ rm -fr %{buildroot} %doc %{_mandir}/man1/virsh.1* %{_bindir}/virsh %{_libdir}/lib*.so.* +%{_libexecdir}/libvirt_proxy %files devel %defattr(-, root, root) diff --git a/proxy/Makefile.am b/proxy/Makefile.am index 5b117a4f0d..87cdb2fb19 100644 --- a/proxy/Makefile.am +++ b/proxy/Makefile.am @@ -5,7 +5,7 @@ INCLUDES = -I$(top_builddir)/include -I@top_srcdir@/include \ -DXEN_RO -bin_PROGRAMS = libvirt_proxy +libexec_PROGRAMS = libvirt_proxy LIBS= libvirt_proxy_SOURCES = libvirt_proxy.c @top_srcdir@/src/xend_internal.c \ @@ -15,3 +15,6 @@ libvirt_proxy_LDFLAGS = libvirt_proxy_DEPENDENCIES = libvirt_proxy_LDADD = +install-exec-hook: + chown root:root $(DESTDIR)$(libexecdir)/libvirt_proxy + chmod u+s $(DESTDIR)$(libexecdir)/libvirt_proxy diff --git a/src/proxy_internal.c b/src/proxy_internal.c index b8716b4db4..e588f1e720 100644 --- a/src/proxy_internal.c +++ b/src/proxy_internal.c @@ -468,7 +468,7 @@ retry: } /** - * xenProxyInit: + * xenProxyOpen: * @conn: pointer to the hypervisor connection * @name: URL for the target, NULL for local * @flags: combination of virDrvOpenFlag(s) @@ -714,6 +714,7 @@ xenProxyDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info) } memset(&req, 0, sizeof(req)); req.command = VIR_PROXY_DOMAIN_INFO; + req.data.arg = domain->handle; req.len = sizeof(req); ret = xenProxyCommand(domain->conn, &req, &ans); if (ret < 0) { @@ -765,7 +766,7 @@ xenProxyLookupByID(virConnectPtr conn, int id) xenProxyClose(conn); return(NULL); } - if (req.data.arg == -1) { + if (ans.data.arg == -1) { return(NULL); } memcpy(uuid, &ans.extra.str[0], 16); diff --git a/src/xen_internal.c b/src/xen_internal.c index 761bab6a6a..8ec4f1b54d 100644 --- a/src/xen_internal.c +++ b/src/xen_internal.c @@ -669,10 +669,6 @@ xenHypervisorGetDomInfo(virConnectPtr conn, int id, virDomainInfoPtr info) int xenHypervisorGetDomainInfo(virDomainPtr domain, virDomainInfoPtr info) { - dom0_op_t op; - dom0_getdomaininfo_t dominfo; - int ret; - if ((domain == NULL) || (domain->conn == NULL) || (domain->conn->handle < 0) || (info == NULL) || (domain->handle < 0))