From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XW5fK-00087u-KS for qemu-devel@nongnu.org; Mon, 22 Sep 2014 11:36:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XW5fA-0008WV-TC for qemu-devel@nongnu.org; Mon, 22 Sep 2014 11:36:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XW5fA-0008Vv-Lo for qemu-devel@nongnu.org; Mon, 22 Sep 2014 11:36:28 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8MFaMbA023648 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 22 Sep 2014 11:36:23 -0400 From: Max Reitz Date: Mon, 22 Sep 2014 17:36:17 +0200 Message-Id: <1411400179-10605-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH v2 0/2] raw-posix: Fix raw_co_get_block_status() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Paolo Bonzini , Stefan Hajnoczi , Max Reitz raw_co_get_block_status() should return 0 and set *pnum to 0 after the EOF; currently it does this merely by accident, so implement it directly. Also, nb_sectors should be clamped against the image end. While doing that, centralize the generation of raw_co_get_block_status()'s return value along the way. v2: - Patch 1: Clamp nb_sectors against image end - Patch 2: Fix alignment issue Max Reitz (2): raw-posix: Fix raw_co_get_block_status() after EOF raw-posix: raw_co_get_block_status() return value block/raw-posix.c | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) -- 2.1.0