* libvirt.spec.in: libvirt-devel depends on pkgconfig

* proxy/libvirt_proxy.c src/libvirt.c src/proxy_internal.[ch]
  src/xs_internal.[ch]: the virtGetOsType entry point was calling
  the xenstore directly instead of going though driver, refactored
  and implemented a specific new RPC with the proxy when this is
  called as non-root fixes rhbz#214264 .
Daniel
This commit is contained in:
Daniel Veillard
2006-11-07 16:28:16 +00:00
parent 4a9ce62fe9
commit d762148aaf
10 changed files with 231 additions and 69 deletions
+10 -5
View File
@@ -1239,18 +1239,23 @@ virDomainGetID(virDomainPtr domain)
char *
virDomainGetOSType(virDomainPtr domain)
{
char *vm, *str = NULL;
char *str = NULL;
int i;
if (!VIR_IS_DOMAIN(domain)) {
virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
return (NULL);
}
vm = virDomainGetVM(domain);
if (vm) {
str = virDomainGetVMInfo(domain, vm, "image/ostype");
free(vm);
for (i = 0;i < domain->conn->nb_drivers;i++) {
if ((domain->conn->drivers[i] != NULL) &&
(domain->conn->drivers[i]->domainGetOSType != NULL)) {
str = domain->conn->drivers[i]->domainGetOSType(domain);
if (str != NULL)
break;
}
}
if (str == NULL)
str = strdup("linux");