int idle_tag;
char *label;
char *filename;
- int opened;
+ int be_open;
+ int fe_open;
+ int explicit_fe_open;
int avail_connections;
QemuOpts *opts;
QTAILQ_ENTRY(CharDriverState) next;
*/
int qemu_chr_fe_write(CharDriverState *s, const uint8_t *buf, int len);
+/**
+ * @qemu_chr_fe_write_all:
+ *
+ * Write data to a character backend from the front end. This function will
+ * send data from the front end to the back end. Unlike @qemu_chr_fe_write,
+ * this function will block if the back end cannot consume all of the data
+ * attempted to be written.
+ *
+ * @buf the data
+ * @len the number of bytes to send
+ *
+ * Returns: the number of bytes consumed
+ */
+int qemu_chr_fe_write_all(CharDriverState *s, const uint8_t *buf, int len);
+
/**
* @qemu_chr_fe_ioctl:
*
IOEventHandler *fd_event,
void *opaque);
-void qemu_chr_generic_open(CharDriverState *s);
+void qemu_chr_be_generic_open(CharDriverState *s);
void qemu_chr_accept_input(CharDriverState *s);
int qemu_chr_add_client(CharDriverState *s, int fd);
void qemu_chr_info_print(Monitor *mon, const QObject *ret_data);