ia64/xen-unstable

changeset 17909:baf3cc0faffc

tapdisk: Fix qcow2 for images > 2 GB

Signed-off-by: Kevin Wolf <kwolf@suse.de>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 27 14:03:52 2008 +0100 (2008-06-27)
parents e5ae980fe337
children 37ff3322d4f3
files tools/blktap/drivers/block-qcow2.c
line diff
     1.1 --- a/tools/blktap/drivers/block-qcow2.c	Fri Jun 27 13:45:55 2008 +0100
     1.2 +++ b/tools/blktap/drivers/block-qcow2.c	Fri Jun 27 14:03:52 2008 +0100
     1.3 @@ -254,10 +254,7 @@ static int bdrv_pread(int fd, int64_t of
     1.4   */
     1.5  static int bdrv_pwrite(int fd, int64_t offset, const void *buf, int count)
     1.6  {
     1.7 -	int ret;
     1.8 -	
     1.9 -	ret = lseek(fd, offset, SEEK_SET);
    1.10 -	if (ret != offset) {
    1.11 +	if (lseek(fd, offset, SEEK_SET) == -1) {
    1.12  		DPRINTF("bdrv_pwrite failed seek (%#"PRIx64").\n", offset);
    1.13  		return -1;
    1.14  	}