[Libvir] [PATCH] Fix virDomainGetMaxVcpus in remote case
by Richard W.M. Jones
There's a typo in the remote_internal.c driver which causes it to call
the wrong back-end function for virDomainGetMaxVcpus. The simple fix is
attached.
Rich.
--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903
17 years, 5 months
[Libvir] [PATCH] Xen driver doesn't support autostart, so remove it from xen_unified
by Richard W.M. Jones
Our implementation of the Xen driver doesn't support autostart[*].
However xen_unified.c has a loop for get/setAutostart which causes it to
return an error without setting virterror first. This patch removes
that loop.
Rich.
[*] Although Xen supports it, by putting files in /etc/xen/autostart/
(at least that was the "old Xen" way before the current insanity of
getting rid of config files was invented).
--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903
17 years, 5 months
[Libvir] Avoid leak upon failed realloc
by Jim Meyering
This matters only if/when this realloc call fails. And then, only in
the small way that with this patch, there's a slightly better chance of
recovering from the low-memory condition.
2007-06-22 Jim Meyering <jim(a)meyering.net>
* qemud/driver.c (qemudMonitorCommand): Avoid leak upon failed realloc.
Index: qemud/driver.c
===================================================================
RCS file: /data/cvs/libvirt/qemud/driver.c,v
retrieving revision 1.21
diff -u -p -r1.21 driver.c
--- qemud/driver.c 15 Jun 2007 13:44:19 -0000 1.21
+++ qemud/driver.c 22 Jun 2007 09:43:59 -0000
@@ -75,6 +75,7 @@ int qemudMonitorCommand(struct qemud_ser
for (;;) {
char data[1024];
int got = read(vm->monitor, data, sizeof(data));
+ char *b;
if (got == 0) {
if (buf)
@@ -91,8 +92,11 @@ int qemudMonitorCommand(struct qemud_ser
free(buf);
return -1;
}
- if (!(buf = realloc(buf, size+got+1)))
+ if (!(b = realloc(buf, size+got+1))) {
+ free(buf);
return -1;
+ }
+ buf = b;
memmove(buf+size, data, got);
buf[size+got] = '\0';
size += got;
17 years, 5 months
[Libvir] [PATCH] Add support for scheduler functions in remote
by Richard W.M. Jones
This is a rather tedious patch, but I've tested it against the Xen
driver and it works for getting and setting the various parameters and
scheduler type.
Rich.
--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903
17 years, 5 months
[Libvir] [PATCH] Fix string handling in virDomain{Get, Set}SchedulerParameters
by Richard W.M. Jones
This small patch fixes some bugs in the handling of the field string in
virDomainGetSchedulerParameters and makes a similar pre-emptive fix to
virDomainSetSchedulerParameters.
Also, please don't use !strcmp(a,b), because it confuses me. Better is
to write strcmp(a,b) == 0 to mean "strings match" and strcmp(a,b) != 0
to mean "strings don't match".
Rich.
--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903
17 years, 5 months
[Libvir] [PATCH] Fix remote virConnectGetMaxVcpus
by Richard W.M. Jones
I've been going over the interface to libvirt, trying out every call
locally and remotely with all possible combinations of parameters that I
can think of. Not surprisingly one or two problems have cropped up. So
here's a short series of patches to fix the problems I've found.
virConnectGetMaxVcpus has a second "type" parameter. In practice this
isn't used and can be passed as NULL. However that fails in the remote
case. The fix is simple enough -- attached.
Rich.
--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903
17 years, 5 months