From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nz3PY-0008Si-2o for qemu-devel@nongnu.org; Tue, 06 Apr 2010 03:41:24 -0400 Received: from [140.186.70.92] (port=53396 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nz3PW-0008Ry-64 for qemu-devel@nongnu.org; Tue, 06 Apr 2010 03:41:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nz3PP-00011q-Tf for qemu-devel@nongnu.org; Tue, 06 Apr 2010 03:41:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16097) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nz3PJ-00010r-JK for qemu-devel@nongnu.org; Tue, 06 Apr 2010 03:41:10 -0400 Message-ID: <4BBAE587.1070003@redhat.com> Date: Tue, 06 Apr 2010 09:40:55 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1270471538-31275-1-git-send-email-amit.shah@redhat.com> <1270471538-31275-2-git-send-email-amit.shah@redhat.com> In-Reply-To: <1270471538-31275-2-git-send-email-amit.shah@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: qemu list , Juan Quintela 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