diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2011-06-30 18:26:29 +0100 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2011-07-17 01:54:25 +0200 |
commit | 0f51726adcdb620214405a88b2601d9edd059db4 (patch) | |
tree | 3fba5ca232ad003acad8dbb21c824a385c614b2d /hw/xen_common.h | |
parent | 9fbe4784449f6248224ac95e0aa9e56a0bfdd155 (diff) |
xen_console: support the new extended xenstore protocol
Since CS 21994 on xen-unstable.hg and CS
466608f3a32e1f9808acdf832a5843af37e5fcec on qemu-xen-unstable.git, few
changes have been introduced to the PV console xenstore protocol, as
described by the document docs/misc/console.txt under xen-unstable.hg.
From the Qemu point of view, very few modifications are needed to
correctly support the protocol: read from xenstore the "output" node
that tell us what the output of the PV console is going to be.
In case the output is a tty, write to xenstore the device name.
Changes in v2:
- fix error paths: free malloc'ed strings and close the xenstore
connection before returning;
- remove useless snprintf in xenstore_store_pv_console_info if i == 0.
Changes in v3:
- replace xs_daemon_open/xs_daemon_close with xs_open/xs_close.
Changes in v4:
- add a compatibility implementation of xs_open/xs_close.
Changes in v5:
- fix code style.
[agraf] fix build error due to missing stub
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/xen_common.h')
-rw-r--r-- | hw/xen_common.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/xen_common.h b/hw/xen_common.h index 2c79af64d0..0409ac7971 100644 --- a/hw/xen_common.h +++ b/hw/xen_common.h @@ -85,6 +85,18 @@ static inline int xc_domain_add_to_physmap(int xc_handle, uint32_t domid, return xc_memory_op(xc_handle, XENMEM_add_to_physmap, &xatp); } +static inline struct xs_handle *xs_open(unsigned long flags) +{ + return xs_daemon_open(); +} + +static inline void xs_close(struct xs_handle *xsh) +{ + if (xsh != NULL) { + xs_daemon_close(xsh); + } +} + /* Xen 4.1 */ #else |