mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
Make drivers be 'quiet' when opening RW connection. Removed duplicated RO checks
This commit is contained in:
parent
b084f43f71
commit
bfd5060347
@ -1,3 +1,10 @@
|
||||
Wed Aug 16 11:31:59 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/libvirt.c: Remove some duplicated changes for VIR_DOMAIN_RO
|
||||
accidentally left in place from last checkin. Tell the drivers to
|
||||
be 'quiet' when opening a RW connection, to stop XenD driver
|
||||
complaining when we open the test driver.
|
||||
|
||||
Wed Aug 16 17:24:59 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* include/libvirt/virterror.h src/libvirt.c src/virterror.c: enforce
|
||||
|
@ -240,7 +240,7 @@ virConnectOpen(const char *name)
|
||||
|
||||
for (i = 0;i < MAX_DRIVERS;i++) {
|
||||
if ((virDriverTab[i] != NULL) && (virDriverTab[i]->open != NULL)) {
|
||||
res = virDriverTab[i]->open(ret, name, 0);
|
||||
res = virDriverTab[i]->open(ret, name, VIR_DRV_OPEN_QUIET);
|
||||
/*
|
||||
* For a default connect to Xen make sure we manage to contact
|
||||
* all related drivers.
|
||||
@ -812,10 +812,6 @@ virDomainSuspend(virDomainPtr domain)
|
||||
}
|
||||
|
||||
conn = domain->conn;
|
||||
#if PEDANTIC
|
||||
if (domain->conn->flags & VIR_CONNECT_RO)
|
||||
return (-1);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Go though the driver registered entry points but use the
|
||||
@ -868,10 +864,6 @@ virDomainResume(virDomainPtr domain)
|
||||
}
|
||||
|
||||
conn = domain->conn;
|
||||
#if PEDANTIC
|
||||
if (domain->conn->flags & VIR_CONNECT_RO)
|
||||
return (-1);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Go though the driver registered entry points but use the
|
||||
@ -1053,10 +1045,6 @@ virDomainShutdown(virDomainPtr domain)
|
||||
}
|
||||
|
||||
conn = domain->conn;
|
||||
#if PEDANTIC
|
||||
if (domain->conn->flags & VIR_CONNECT_RO)
|
||||
return (-1);
|
||||
#endif
|
||||
|
||||
/* Go though the driver registered entry points */
|
||||
for (i = 0;i < conn->nb_drivers;i++) {
|
||||
@ -1102,10 +1090,6 @@ virDomainReboot(virDomainPtr domain, unsigned int flags)
|
||||
}
|
||||
|
||||
conn = domain->conn;
|
||||
#if PEDANTIC
|
||||
if (domain->conn->flags & VIR_CONNECT_RO)
|
||||
return (-1);
|
||||
#endif
|
||||
|
||||
/* Go though the driver registered entry points */
|
||||
for (i = 0;i < conn->nb_drivers;i++) {
|
||||
@ -1341,8 +1325,6 @@ virDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
|
||||
return (-1);
|
||||
}
|
||||
conn = domain->conn;
|
||||
if (domain->conn->flags & VIR_CONNECT_RO)
|
||||
return (-1);
|
||||
|
||||
/*
|
||||
* in that case instead of trying only though one method try all availble.
|
||||
@ -1738,6 +1720,7 @@ virDomainSetVcpus(virDomainPtr domain, unsigned int nvcpus)
|
||||
virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (nvcpus < 1) {
|
||||
virLibDomainError(domain, VIR_ERR_INVALID_ARG, __FUNCTION__);
|
||||
return (-1);
|
||||
@ -1806,6 +1789,7 @@ virDomainPinVcpu(virDomainPtr domain, unsigned int vcpu,
|
||||
virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if ((vcpu > 32000) || (cpumap == NULL) || (maplen < 1)) {
|
||||
virLibDomainError(domain, VIR_ERR_INVALID_ARG, __FUNCTION__);
|
||||
return (-1);
|
||||
|
Loading…
Reference in New Issue
Block a user