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 updates
[palacios.git] / misc / network_servers / v3_nbd / raw.cc
index 67b03d5..f4d5ef5 100644 (file)
  * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
  */
 
-#include "v3_nbd.h"
+#include "v3_disk.h"
+#include "raw.h"
 
 
-
-raw_disk::raw_disk(string &filename) {
+raw_disk::raw_disk(string & filename) : v3_disk(filename){
     this->f = fopen(filename.c_str(), "w+");
 }
 
 
-unsigned long long raw_disk::get_capacity() {
+off_t raw_disk::get_capacity() {
     
-
+    return 0;
 }
 
 
 
 int raw_disk::read(unsigned char * buf, unsigned long long offset, int length) {
 
-
+    return -1;
 }
 
 
 
 int raw_disk::write(unsigned char * buf, unsigned long long offset, int length) {
+    
+    return -1;
+}
+
+
+void raw_disk::attach() {
+    this->locked = 1;
+}
 
 
+void raw_disk::detach() {
+    this->locked = 0;
 }