qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 1/5] char: Let the caller know how many bytes we


From: Gerd Hoffmann
Subject: [Qemu-devel] Re: [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes
Date: Tue, 06 Apr 2010 09:40:55 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4

  Hi,

Make 'len' a pointer instead, and indicate how much of the string was
written. The return value will either be the same as 'len' or a negative
number indicating an error condition.

I would follow the unix write syscall semantic here and report the number of written bytes using the return value. Matter of taste though.

cheers,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]