#include <devices/ide.h>
#include <palacios/vmm_socket.h>
-#ifndef DEBUG_IDE
+#ifndef CONFIG_DEBUG_IDE
#undef PrintDebug
#define PrintDebug(fmt, args...)
#endif
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};
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};
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,