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.


Remove the Linux host bridge code in Palacios
[palacios.git] / palacios / src / devices / netdisk.c
index 552de56..ec042d6 100644 (file)
@@ -132,7 +132,7 @@ static int read(uint8_t * buf, uint64_t lba, uint64_t num_bytes, void * private_
     }
 
     if (ret_len != length) {
-       PrintError("Read length mismatch (req=%d) (result=%d)\n", length, ret_len);
+       PrintError("Read length mismatch (req=%llu) (result=%u)\n", length, ret_len);
        return -1;
     }
 
@@ -261,7 +261,7 @@ static int socket_init(struct disk_state * disk) {
            return -1;
        }       
 
-       PrintDebug("Capacity: %p\n", (void *)(disk->capacity));
+       PrintDebug("Capacity: %p\n", (void *)(addr_t)disk->capacity);
     }
 
 
@@ -270,13 +270,13 @@ static int socket_init(struct disk_state * disk) {
 }
 
 
-static int disk_init(struct guest_info * vm, v3_cfg_tree_t * cfg) {
+static int disk_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
     struct disk_state * disk = (struct disk_state *)V3_Malloc(sizeof(struct disk_state));
 
     char * ip_str = v3_cfg_val(cfg, "IP");
     char * port_str = v3_cfg_val(cfg, "port");
     char * disk_tag = v3_cfg_val(cfg, "tag");
-    char * name = v3_cfg_val(cfg, "name");
+    char * dev_id = v3_cfg_val(cfg, "ID");
 
     v3_cfg_tree_t * frontend_cfg = v3_cfg_subtree(cfg, "frontend");
 
@@ -286,10 +286,10 @@ static int disk_init(struct guest_info * vm, v3_cfg_tree_t * cfg) {
     disk->ip_addr = v3_inet_addr(ip_str);
     disk->port = atoi(port_str);
        
-    struct vm_device * dev = v3_allocate_device(name, &dev_ops, disk);
+    struct vm_device * dev = v3_allocate_device(dev_id, &dev_ops, disk);
 
     if (v3_attach_device(vm, dev) == -1) {
-       PrintError("Could not attach device %s\n", name);
+       PrintError("Could not attach device %s\n", dev_id);
        return -1;
     }
 
@@ -302,7 +302,7 @@ static int disk_init(struct guest_info * vm, v3_cfg_tree_t * cfg) {
 
     if (v3_dev_connect_blk(vm, v3_cfg_val(frontend_cfg, "tag"), 
                           &blk_ops, frontend_cfg, disk) == -1) {
-       PrintError("Could not connect %s to frontend\n", name);
+       PrintError("Could not connect %s to frontend\n", dev_id);
        return -1;
     }