Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / ipxe / src / include / ipxe / lineconsole.h
diff --git a/qemu/roms/ipxe/src/include/ipxe/lineconsole.h b/qemu/roms/ipxe/src/include/ipxe/lineconsole.h
new file mode 100644 (file)
index 0000000..925c0ac
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef _IPXE_LINECONSOLE_H
+#define _IPXE_LINECONSOLE_H
+
+/** @file
+ *
+ * Line-based console
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER );
+
+#include <stdint.h>
+#include <ipxe/ansiesc.h>
+
+/** A line-based console */
+struct line_console {
+       /** Data buffer
+        *
+        * Must initially be filled with NULs
+        */
+       char *buffer;
+       /** Current index within buffer */
+       size_t index;
+       /** Length of buffer
+        *
+        * The final character of the buffer will only ever be used as
+        * a potential terminating NUL.
+        */
+       size_t len;
+       /** ANSI escape sequence context */
+       struct ansiesc_context ctx;
+};
+
+extern size_t line_putchar ( struct line_console *line, int character );
+
+#endif /* _IPXE_LINECONSOLE_H */