From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZboaW-0006dQ-WD for qemu-devel@nongnu.org; Tue, 15 Sep 2015 07:39:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZboaT-0008VQ-0N for qemu-devel@nongnu.org; Tue, 15 Sep 2015 07:39:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45828) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZboaS-0008VM-SR for qemu-devel@nongnu.org; Tue, 15 Sep 2015 07:39:48 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 979678E3E9 for ; Tue, 15 Sep 2015 11:39:48 +0000 (UTC) Date: Tue, 15 Sep 2015 17:09:35 +0530 From: Amit Shah Message-ID: <20150915113935.GG10281@grmbl.mre> References: <1439463094-5394-1-git-send-email-dgilbert@redhat.com> <1439463094-5394-5-git-send-email-dgilbert@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1439463094-5394-5-git-send-email-dgilbert@redhat.com> Subject: Re: [Qemu-devel] [PATCH 4/5] migration: size_t'ify some of qemu-file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert (git)" Cc: qemu-devel@nongnu.org, quintela@redhat.com On (Thu) 13 Aug 2015 [11:51:33], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > This is a start on using size_t more in qemu-file and friends; > it fixes up QEMUFilePutBufferFunc and QEMUFileGetBufferFunc > to take size_t lengths and return ssize_t return values (like read(2)) > and fixes up all the different implementations of them. > > Note that I've not yet followed this deeply into bdrv_ implementations. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Amit Shah This is really nice, thanks! (Though it got me into thinking what values are fine to be stored in size_t and ssize_t: and the POSIX spec doesn't specify what the SSIZE_MIN value is; it only says ssize_t can hold -1..SIZE_MAX. Hope we don't have fun due to the -errno return values.) Amit