[libvirt] [PATCH 6/7] Re-write virsh console to use streams

Eric Blake eblake at redhat.com
Fri Aug 20 14:10:44 UTC 2010


On 08/20/2010 03:10 AM, Daniel P. Berrange wrote:
>>> +        done = write(fd,
>>> +                     con->streamToTerminal.data,
>>> +                     con->streamToTerminal.offset);
>>
>> Do we want to use safewrite here?
> 
> All I/O in this is now done non-blocking, so don't actually want to
> block on writing the entire buffer. The code expect to see partial
> writes & will handle those in a suitable manner, going back to sleep
> in the event loop

Good point (I was just comparing it to the old code, thinking it was
straight code motion; but it was also a conversion in I/O styles).
You've answered my question, so that only leaves my suggestion on making
virConsole.quit a bool instead of int; ACK.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100820/fb43c162/attachment-0001.sig>


More information about the libvir-list mailing list