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.


Avoid strict-aliasing related issues when compiling with optimization
[palacios.git] / linux_module / inspector.c
index b6cfc1a..867bba1 100644 (file)
@@ -58,14 +58,14 @@ static int inspect_vm(struct v3_guest * guest, unsigned int cmd, unsigned long a
 
 
     if (root == NULL) {
-       printk("No inspection root found\n");
+       ERROR("No inspection root found\n");
        return -1;
     }
 
     guest_dir = debugfs_create_dir(guest->name, v3_dir);
 
-    if (IS_ERR(guest_dir)) {
-       printk("Error Creating inspector tree for VM \"%s\"\n", guest->name);
+    if (!guest_dir || IS_ERR(guest_dir)) {
+       ERROR("Error Creating inspector tree for VM \"%s\"\n", guest->name);
        return -1;
     }
 
@@ -79,8 +79,8 @@ static int init_inspector( void ) {
 
     v3_dir = debugfs_create_dir("v3vee", NULL);
 
-    if (IS_ERR(v3_dir)) {
-       printk("Error creating v3vee debugfs directory\n");
+    if (!v3_dir || IS_ERR(v3_dir)) {
+       ERROR("Error creating v3vee debugfs directory\n");
        return -1;
     }
 
@@ -101,7 +101,8 @@ static int guest_init(struct v3_guest * guest, void ** vm_data) {
 }
 
 static int guest_deinit(struct v3_guest * guest, void * vm_data) {
-    
+    remove_guest_ctrl(guest, V3_VM_INSPECT);
+   
     return 0;
 }