#include <palacios/vmm_host_events.h>
#include <palacios/vmm_lock.h>
#include <palacios/vmm_string.h>
-#include <palacios/vmm_socket.h>
+#include <interfaces/vmm_socket.h>
#include <devices/console.h>
.update_screen = screen_update,
.update_cursor = cursor_update,
.scroll = scroll,
+ .set_text_resolution = NULL,
};
-static int cons_free(struct vm_device * dev) {
- return -1;
+static int cons_free(struct cons_state * state) {
+
+ // kill thread... ?
+
+ V3_Free(state);
+ return 0;
}
static struct v3_device_ops dev_ops = {
- .free = cons_free,
+ .free = (int (*)(void *))cons_free,
};
struct vm_device * frontend = v3_find_dev(vm, v3_cfg_val(frontend_cfg, "tag"));
char * dev_id = v3_cfg_val(cfg, "ID");
+ if (!state) {
+ PrintError("Cannot allocate in init\n");
+ return -1;
+ }
+
+
state->vm = vm;
state->server_fd = 0;
state->client_fd = 0;