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.


Replaced spurious V3_Print in apic.c with PrintDebug
[palacios.git] / palacios / src / devices / disk_model.c
index c1d8836..b142547 100644 (file)
@@ -58,8 +58,12 @@ static uint64_t model_get_capacity(void * private_data) {
     return model->ops->get_capacity(model->private_data);
 }
 
-static int model_free(struct vm_device * dev) {
-    return -1;
+static int model_free(struct disk_state * model) {
+
+    // unhook from frontend
+
+    V3_Free(model);
+    return 0;
 }
 
 
@@ -73,7 +77,7 @@ static struct v3_dev_blk_ops blk_ops = {
 
 
 static struct v3_device_ops dev_ops = {
-    .free = model_free,
+    .free = (int (*)(void *))model_free,
 };