mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
* src/libvirt.c src/xen_internal.[ch]: virConnectOpenReadOnly()
should not emit error when failing to open the hypervisor proc entry point. Daniel
This commit is contained in:
parent
87d338374a
commit
5548938d62
@ -1,3 +1,9 @@
|
||||
Mon Feb 27 16:42:46 EST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/libvirt.c src/xen_internal.[ch]: virConnectOpenReadOnly()
|
||||
should not emit error when failing to open the hypervisor proc
|
||||
entry point.
|
||||
|
||||
Mon Feb 27 16:32:55 EST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* include/virterror.h src/libvirt_sym.version: exported
|
||||
|
@ -140,7 +140,7 @@ virConnectOpen(const char *name) {
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
handle = xenHypervisorOpen();
|
||||
handle = xenHypervisorOpen(0);
|
||||
if (handle == -1) {
|
||||
goto failed;
|
||||
}
|
||||
@ -200,7 +200,7 @@ virConnectOpenReadOnly(const char *name) {
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
handle = xenHypervisorOpen();
|
||||
handle = xenHypervisorOpen(1);
|
||||
if (handle >= 0)
|
||||
method++;
|
||||
else
|
||||
|
@ -59,17 +59,19 @@ virXenError(virErrorNumber error, const char *info, int value) {
|
||||
|
||||
/**
|
||||
* xenHypervisorOpen:
|
||||
* @quiet: don'r raise an error on failure if set
|
||||
*
|
||||
* Connects to the Xen hypervisor.
|
||||
*
|
||||
* Returns the handle or -1 in case of error.
|
||||
*/
|
||||
int xenHypervisorOpen(void) {
|
||||
int xenHypervisorOpen(int quiet) {
|
||||
int ret;
|
||||
|
||||
ret = open(XEN_HYPERVISOR_SOCKET, O_RDWR);
|
||||
if (ret < 0) {
|
||||
virXenError(VIR_ERR_NO_XEN, XEN_HYPERVISOR_SOCKET, 0);
|
||||
if (!quiet)
|
||||
virXenError(VIR_ERR_NO_XEN, XEN_HYPERVISOR_SOCKET, 0);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int xenHypervisorOpen (void);
|
||||
int xenHypervisorOpen (int quiet);
|
||||
int xenHypervisorClose (int handle);
|
||||
unsigned long xenHypervisorGetVersion (int handle);
|
||||
int xenHypervisorDestroyDomain (int handle,
|
||||
|
Loading…
Reference in New Issue
Block a user