On Wed, Aug 08, 2012 at 10:24:15AM -0300, Erlon Cruz wrote: > On Wed, Aug 8, 2012 at 7:19 AM, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote: > > I think it would be better to write a sync_write equivalent which reads an > > array 4 bytes at a time and swaps them before sending, this will avoid the > > need for the memdup and the helper function. > > Do we really need to break the simplicity here?('convert the buffers > to LE and send it'). This path is only called a few times. > We would still need another function right? How about patching sync_write? sync_write is probably used to send structures with char-sized fields, so patching it wouldn't work out. Having a sync_write_htole (better name welcome) makes things simpler imo, instead of converting and then sending, you just send them and the correct transform is automatically applied. Christophe
Attachment:
pgppl2ujs_1Lv.pgp
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel