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.


add backend device for direct host network bridge
[palacios.git] / palacios / src / devices / telnet_cons.c
index 8f71adf..00415c5 100644 (file)
 #include <palacios/vmm_string.h>
 #include <palacios/vmm_socket.h>
 
-#include <devices/cga.h>
+#include <devices/console.h>
+#if 0
 #include <devices/telnet_cons.h>
+#endif
 
 #define NUM_ROWS 25
 #define NUM_COLS 80
@@ -516,14 +518,16 @@ static int cons_server(void * arg) {
        state->connected = 0;
        V3_Close_Socket(state->client_fd);
     }
+    
+    return -1;
 }
 
 
-static int cons_init(struct guest_info * vm, v3_cfg_tree_t * cfg) {
+static int cons_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
     struct cons_state * state = (struct cons_state *)V3_Malloc(sizeof(struct cons_state));
     v3_cfg_tree_t * frontend_cfg = v3_cfg_subtree(cfg, "frontend");
-    struct vm_device * frontend = v3_find_dev(vm, v3_cfg_val(frontend_cfg, "id"));
-    char * name = v3_cfg_val(cfg, "name");
+    struct vm_device * frontend = v3_find_dev(vm, v3_cfg_val(frontend_cfg, "tag"));
+    char * dev_id = v3_cfg_val(cfg, "ID");
 
 
     state->server_fd = 0;
@@ -533,10 +537,10 @@ static int cons_init(struct guest_info * vm, v3_cfg_tree_t * cfg) {
     v3_lock_init(&(state->cons_lock));
 
 
-    struct vm_device * dev = v3_allocate_device(name, &dev_ops, state);
+    struct vm_device * dev = v3_allocate_device(dev_id, &dev_ops, state);
 
     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;
     }