From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwtGL-0008Lh-6Z for qemu-devel@nongnu.org; Thu, 02 Aug 2012 07:08:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwtGF-00023g-Gm for qemu-devel@nongnu.org; Thu, 02 Aug 2012 07:08:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwtGF-00023a-8l for qemu-devel@nongnu.org; Thu, 02 Aug 2012 07:08:11 -0400 Message-ID: <501A5F92.3080102@redhat.com> Date: Thu, 02 Aug 2012 13:08:02 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1343812186-11594-1-git-send-email-xiawenc@linux.vnet.ibm.com> <501A37EF.7020305@linux.vnet.ibm.com> <20120802101754.GA27056@stefanha-thinkpad.localdomain> In-Reply-To: <20120802101754.GA27056@stefanha-thinkpad.localdomain> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] [RFC] libqblock draft code v1 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Stefan Hajnoczi , aliguori@us.ibm.com, Wenchao Xia , qemu-devel@nongnu.org Il 02/08/2012 12:17, Stefan Hajnoczi ha scritto: >> > Main purpose of it is to set ret to err_v when memory is not enough, >> > I am not sure how to make this happens for every strdup. > Eric pointed out that we cannot use g_strdup() because it aborts on > memory allocation failure, so please ignore my suggestion to use that. I wouldn't. What good it is to avoid g_strdup, if the block layer will later use g_malloc anyway? Paolo