[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [libvirt] [PATCH] create() and destroy() support for Power Hypervisor
- From: Daniel Veillard <veillard redhat com>
- To: Eduardo Otubo <otubo linux vnet ibm com>
- Cc: libvirt <libvir-list redhat com>, Vivek Kashyap <vivk us ibm com>
- Subject: Re: [libvirt] [PATCH] create() and destroy() support for Power Hypervisor
- Date: Thu, 5 Nov 2009 17:24:37 +0100
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 veillard com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]