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.


Merge branch 'devel' of ssh://palacios@newskysaw.cs.northwestern.edu/home/palacios...
[palacios.git] / misc / network_servers / v3_nbd / raw.h
index 8facc9e..246daa2 100644 (file)
 #ifndef __RAW_H__
 #define __RAW_H__
 
+#include "v3_disk.h"
+#include <stdio.h>
 
 class raw_disk : public v3_disk {
- private:
-    raw_disk(config_t &config_map, string &disk_tag);
-    
-    File * f;
-
- public:
-    unsigned long long get_capacity();
-    int read(unsigned char * buf, unsigned long long offset, int length);
-    int write(unsigned char * buf, unsigned long long offset, int length);
-
-};
-
 
 
+ public:
+    raw_disk(string & filename);
 
+    off_t get_capacity();
+    unsigned int read(unsigned char * buf, off_t offset, int length);
+    unsigned int write(unsigned char * buf, off_t offset, int length);
 
+    void attach();
+    void detach();
 
+ private:
+    FILE * f;
+};
 
 #endif