Skip to contentSkip to conversation

tapdisk: Fix qcow2 for images > 2 GB

PATCH New Kevin Wolf 1 participant 1 message Jun 27, 2008

lore
Share & tools
lore

Kevin Wolf

author
#0 lore raw

PATCH 1/1 tapdisk: Fix qcow2 for images > 2 GB

tapdisk: Fix qcow2 for images > 2 GB

tools/blktap/drivers/block-qcow2.c +1 -4
Index: xen-3.3.0-testing/tools/blktap/drivers/block-qcow2.c
===================================================================
@@ -254,10 +254,7 @@ static int bdrv_pread(int fd, int64_t of
  */
 static int bdrv_pwrite(int fd, int64_t offset, const void *buf, int count)
 {
-	int ret;
-	
-	ret = lseek(fd, offset, SEEK_SET);
-	if (ret != offset) {
+	if (lseek(fd, offset, SEEK_SET) == -1) {
 		DPRINTF("bdrv_pwrite failed seek (%#"PRIx64").\n", offset);
 		return -1;
 	}

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel