[libvirt] [PATCH] create() and destroy() support for Power Hypervisor
Daniel Veillard
veillard at redhat.com
Thu Nov 5 16:24:37 UTC 2009
On Tue, Nov 03, 2009 at 03:49:16PM -0200, Eduardo Otubo wrote:
> New patch, more fixes.
>
> Matthias Bolte wrote:
> + for (i = 0; i < uuid_table->nlpars; i++) {
> + if (write
> + (fd, &uuid_table->lpars[i]->id,
> + sizeof(uuid_table->lpars[i]->id)) ==
> + sizeof(uuid_table->lpars[i]->id)) {
should use safewrite() and the comparison should be != instead of ==
Did you really test this part of the code ?
> + VIR_ERROR("%s", "Unable to write information to local file.");
> + goto err;
> + }
> +
> + if (write(fd, uuid_table->lpars[i]->uuid, VIR_UUID_BUFLEN) ==
> + VIR_UUID_BUFLEN) {
same mistake
> + VIR_ERROR("%s", "Unable to write information to local file.");
> + goto err;
> + }
> + }
[...]
> + rc = libssh2_channel_read(channel, buffer, amount);
> + if (rc > 0) {
> + if (write(fd, buffer, rc) == -1)
> + VIR_WARN("%s",
> + "Unable to write information to local file.");
and another one.
So I cleaned up those and commited the patch, that doesn't prevent
fixing more things but at least taht wil come in small patches,
thanks !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list