These changes are the raw update to qemu-2.6.
[kvmfornfv.git] / qemu / roms / ipxe / src / include / ipxe / blocktrans.h
diff --git a/qemu/roms/ipxe/src/include/ipxe/blocktrans.h b/qemu/roms/ipxe/src/include/ipxe/blocktrans.h
new file mode 100644 (file)
index 0000000..fee71b9
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef _IPXE_BLOCKTRANS_H
+#define _IPXE_BLOCKTRANS_H
+
+/** @file
+ *
+ * Block device translator
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#include <stdint.h>
+#include <ipxe/refcnt.h>
+#include <ipxe/interface.h>
+#include <ipxe/xferbuf.h>
+#include <ipxe/uaccess.h>
+
+/** A block device translator */
+struct block_translator {
+       /** Reference count */
+       struct refcnt refcnt;
+       /** Block device interface */
+       struct interface block;
+       /** Data transfer interface */
+       struct interface xfer;
+
+       /** Data transfer buffer */
+       struct xfer_buffer xferbuf;
+       /** Data buffer */
+       userptr_t buffer;
+       /** Block size */
+       size_t blksize;
+};
+
+extern int block_translate ( struct interface *block,
+                            userptr_t buffer, size_t size );
+
+#endif /* _IPXE_BLOCKTRANS_H */