From: Jack Lange Date: Thu, 18 Nov 2010 19:32:18 +0000 (-0600) Subject: argument order fix X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=99a5ead7f3960f33a62d8781c92c75099bea89c0;hp=dadac9c02898a50c7c128d4bbcef39a0e339aa8c;p=palacios.releases.git argument order fix --- diff --git a/palacios/src/devices/filedisk.c b/palacios/src/devices/filedisk.c index 44ec18c..f4e6318 100644 --- a/palacios/src/devices/filedisk.c +++ b/palacios/src/devices/filedisk.c @@ -41,7 +41,7 @@ static int write_all(v3_file_t fd, char * buf, int offset, int length) { PrintDebug("Writing %d bytes\n", length - bytes_written); while (bytes_written < length) { - int tmp_bytes = v3_file_write(fd, buf + bytes_written, offset + bytes_written, length - bytes_written); + int tmp_bytes = v3_file_write(fd, buf + bytes_written, length - bytes_written, offset + bytes_written); PrintDebug("Wrote %d bytes\n", tmp_bytes); if (tmp_bytes <= 0 ) { @@ -61,7 +61,7 @@ static int read_all(v3_file_t fd, char * buf, int offset, int length) { PrintDebug("Reading %d bytes\n", length - bytes_read); while (bytes_read < length) { - int tmp_bytes = v3_file_read(fd, buf + bytes_read, offset + bytes_read, length - bytes_read); + int tmp_bytes = v3_file_read(fd, buf + bytes_read, length - bytes_read, offset + bytes_read); PrintDebug("Read %d bytes\n", tmp_bytes); if (tmp_bytes <= 0) { diff --git a/palacios/src/palacios/vmm_file.c b/palacios/src/palacios/vmm_file.c index e0e9a54..6e69ce1 100644 --- a/palacios/src/palacios/vmm_file.c +++ b/palacios/src/palacios/vmm_file.c @@ -35,9 +35,9 @@ void V3_Init_File(struct v3_file_hooks * hooks) { v3_file_t v3_file_open(struct v3_vm_info * vm, char * path, uint8_t mode) { + void * priv_data = NULL; V3_ASSERT(file_hooks); V3_ASSERT(file_hooks->open); - void * priv_data = NULL; if (vm) { priv_data = vm->host_priv_data;