X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fnet_hd.c;h=08947972826ca566040bb83ba221468b1bbabb06;hb=82b8b87c344fcd1eab22e3f3be5ad54cbb3f8f68;hp=bed3e420b860e36dfa651fb1518f432b1e1ce595;hpb=37c18b2c2335a41c68c2f0b779fd2b7d51ab216d;p=palacios.git diff --git a/palacios/src/devices/net_hd.c b/palacios/src/devices/net_hd.c index bed3e42..0894797 100644 --- a/palacios/src/devices/net_hd.c +++ b/palacios/src/devices/net_hd.c @@ -22,7 +22,7 @@ #include #include -#ifndef DEBUG_IDE +#ifndef CONFIG_DEBUG_IDE #undef PrintDebug #define PrintDebug(fmt, args...) #endif @@ -97,8 +97,8 @@ static int recv_all(int socket, char * buf, int length) { static int hd_read(uint8_t * buf, int sector_count, uint64_t lba, void * private_data) { struct vm_device * hd_dev = (struct vm_device *)private_data; struct hd_state * hd = (struct hd_state *)(hd_dev->private_data); - int offset = lba * IDE_SECTOR_SIZE; - int length = sector_count * IDE_SECTOR_SIZE; + int offset = lba * HD_SECTOR_SIZE; + int length = sector_count * HD_SECTOR_SIZE; uint8_t status; uint32_t ret_len = 0; char nbd_cmd[4] = {0,0,0,0}; @@ -156,8 +156,8 @@ static int hd_read(uint8_t * buf, int sector_count, uint64_t lba, void * privat static int hd_write(uint8_t * buf, int sector_count, uint64_t lba, void * private_data) { struct vm_device * hd_dev = (struct vm_device *)private_data; struct hd_state * hd = (struct hd_state *)(hd_dev->private_data); - int offset = lba * IDE_SECTOR_SIZE; - int length = sector_count * IDE_SECTOR_SIZE; + int offset = lba * HD_SECTOR_SIZE; + int length = sector_count * HD_SECTOR_SIZE; uint8_t status; char nbd_cmd[4] = {0,0,0,0}; @@ -203,10 +203,10 @@ static uint64_t hd_get_capacity(void * private_data) { struct vm_device * hd_dev = (struct vm_device *)private_data; struct hd_state * hd = (struct hd_state *)(hd_dev->private_data); - return hd->capacity / IDE_SECTOR_SIZE; + return hd->capacity / HD_SECTOR_SIZE; } -static struct v3_ide_hd_ops hd_ops = { +static struct v3_hd_ops hd_ops = { .read = hd_read, .write = hd_write, .get_capacity = hd_get_capacity,