X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=misc%2Fnetwork_servers%2Fv3_nbd%2Fiso.cc;h=b3542a6bf042a10e3620e7c6128ba4087bb2164a;hb=5d2d71bf1f3105a1fa5085e691eec1fe3306eddc;hp=31faa85d1b28066efc56023808a5f2c73bd1ef9a;hpb=2b1dfc3d1281140e4bcc1ea963ae34e5eef9c8b8;p=palacios.git diff --git a/misc/network_servers/v3_nbd/iso.cc b/misc/network_servers/v3_nbd/iso.cc index 31faa85..b3542a6 100644 --- a/misc/network_servers/v3_nbd/iso.cc +++ b/misc/network_servers/v3_nbd/iso.cc @@ -51,7 +51,7 @@ unsigned int iso_image::read(unsigned char * buf, off_t offset, int length) { fseeko(this->f, offset, SEEK_SET); while (bytes_read < total_bytes) { - int tmp_bytes = fread(buf, 1, length, this->f); + int tmp_bytes = fread(buf, 1, length - bytes_read, this->f); if (tmp_bytes == 0) { break; @@ -65,7 +65,6 @@ unsigned int iso_image::read(unsigned char * buf, off_t offset, int length) { unsigned int iso_image::write(unsigned char * buf, off_t offset, int length) { - return 0; }