X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fnetdisk.c;h=ec042d6b6be64ea8ad39655ae678e428cc292778;hb=35a7784f058e9f6948e1ec455ce2c6c3d467330b;hp=552de56ee2cea363ea75dddf6a0c6d60484fe1b7;hpb=123a1ba27ea09c8fa77a1b36ce625b43d7c48b14;p=palacios.git diff --git a/palacios/src/devices/netdisk.c b/palacios/src/devices/netdisk.c index 552de56..ec042d6 100644 --- a/palacios/src/devices/netdisk.c +++ b/palacios/src/devices/netdisk.c @@ -132,7 +132,7 @@ static int read(uint8_t * buf, uint64_t lba, uint64_t num_bytes, void * private_ } if (ret_len != length) { - PrintError("Read length mismatch (req=%d) (result=%d)\n", length, ret_len); + PrintError("Read length mismatch (req=%llu) (result=%u)\n", length, ret_len); return -1; } @@ -261,7 +261,7 @@ static int socket_init(struct disk_state * disk) { return -1; } - PrintDebug("Capacity: %p\n", (void *)(disk->capacity)); + PrintDebug("Capacity: %p\n", (void *)(addr_t)disk->capacity); } @@ -270,13 +270,13 @@ static int socket_init(struct disk_state * disk) { } -static int disk_init(struct guest_info * vm, v3_cfg_tree_t * cfg) { +static int disk_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) { struct disk_state * disk = (struct disk_state *)V3_Malloc(sizeof(struct disk_state)); char * ip_str = v3_cfg_val(cfg, "IP"); char * port_str = v3_cfg_val(cfg, "port"); char * disk_tag = v3_cfg_val(cfg, "tag"); - char * name = v3_cfg_val(cfg, "name"); + char * dev_id = v3_cfg_val(cfg, "ID"); v3_cfg_tree_t * frontend_cfg = v3_cfg_subtree(cfg, "frontend"); @@ -286,10 +286,10 @@ static int disk_init(struct guest_info * vm, v3_cfg_tree_t * cfg) { disk->ip_addr = v3_inet_addr(ip_str); disk->port = atoi(port_str); - struct vm_device * dev = v3_allocate_device(name, &dev_ops, disk); + struct vm_device * dev = v3_allocate_device(dev_id, &dev_ops, disk); 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; } @@ -302,7 +302,7 @@ static int disk_init(struct guest_info * vm, v3_cfg_tree_t * cfg) { if (v3_dev_connect_blk(vm, v3_cfg_val(frontend_cfg, "tag"), &blk_ops, frontend_cfg, disk) == -1) { - PrintError("Could not connect %s to frontend\n", name); + PrintError("Could not connect %s to frontend\n", dev_id); return -1; }