Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


nbd server updates
[palacios.git] / misc / network_servers / v3_nbd / raw.cc
index f4d5ef5..668850f 100644 (file)
@@ -22,7 +22,7 @@
 
 
 raw_disk::raw_disk(string & filename) : v3_disk(filename){
-    this->f = fopen(filename.c_str(), "w+");
+    this->f = fopen(filename.c_str(), "r+");
 }
 
 
@@ -33,16 +33,16 @@ off_t raw_disk::get_capacity() {
 
 
 
-int raw_disk::read(unsigned char * buf, unsigned long long offset, int length) {
+unsigned int raw_disk::read(unsigned char * buf, off_t offset, int length) {
 
-    return -1;
+    return 0;
 }
 
 
 
-int raw_disk::write(unsigned char * buf, unsigned long long offset, int length) {
+unsigned int raw_disk::write(unsigned char * buf, off_t offset, int length) {
     
-    return -1;
+    return 0;
 }