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.


filedisk XML configuration language tweak
Peter Dinda [Fri, 17 Aug 2012 16:21:43 +0000 (11:21 -0500)]
palacios/src/devices/filedisk.c

index 9625d3b..aae7ae6 100644 (file)
@@ -142,10 +142,13 @@ static int disk_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
     char * path = v3_cfg_val(cfg, "path");
     char * dev_id = v3_cfg_val(cfg, "ID");
     char * writable = v3_cfg_val(cfg, "writable");
+    char * writeable = v3_cfg_val(cfg, "writeable");
+
     v3_cfg_tree_t * frontend_cfg = v3_cfg_subtree(cfg, "frontend");
     int flags = FILE_OPEN_MODE_READ;
 
-    if ( (writable) && (writable[0] == '1') ) {
+    if ( ((writable) && (writable[0] == '1')) ||
+        ((writeable) && (writeable[0] == '1')) ) {
        flags |= FILE_OPEN_MODE_WRITE;
     }
 
@@ -182,8 +185,9 @@ static int disk_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
 
     disk->capacity = v3_file_size(disk->fd);
 
-    V3_Print("Registering FILEDISK %s (path=%s, fd=%lu, size=%llu)\n",
-            dev_id, path, (addr_t)disk->fd, disk->capacity);
+    V3_Print("Registering FILEDISK %s (path=%s, fd=%lu, size=%llu, writeable=%d)\n",
+            dev_id, path, (addr_t)disk->fd, disk->capacity,
+            flags & FILE_OPEN_MODE_WRITE);
 
 
     if (v3_dev_connect_blk(vm, v3_cfg_val(frontend_cfg, "tag"),