X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Ftelnet_cons.c;h=00415c5bd0d80c8c6e70b580d39d16c23757da0f;hb=e4062388960d7fbe39e980b1b06226861e93d0b3;hp=30e07d1f22ecfbf804916b7dab5c9a90f0adf7bb;hpb=123a1ba27ea09c8fa77a1b36ce625b43d7c48b14;p=palacios.git diff --git a/palacios/src/devices/telnet_cons.c b/palacios/src/devices/telnet_cons.c index 30e07d1..00415c5 100644 --- a/palacios/src/devices/telnet_cons.c +++ b/palacios/src/devices/telnet_cons.c @@ -29,8 +29,10 @@ #include #include -#include +#include +#if 0 #include +#endif #define NUM_ROWS 25 #define NUM_COLS 80 @@ -354,7 +356,7 @@ static int screen_update(uint_t x, uint_t y, uint_t length, void * private_data) return ret; } -static int scroll(uint_t rows, void * private_data) { +static int scroll(int rows, void * private_data) { struct vm_device * dev = (struct vm_device *)private_data; struct cons_state * state = (struct cons_state *)dev->private_data; addr_t irq_state = 0; @@ -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; }