# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1222981899 25200
# Node ID 7244474e5d2e118316e1636b06f99acb54062489
# Parent ed51b685c0027aa4a80aab53b96451dbd8084c44
Add obligatory LXC console
This will become less naive when we get real modeling for this, but it
needs to be there for general usefulness in the time being. For now,
just assume a sane default.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r ed51b685c002 -r 7244474e5d2e libxkutil/xmlgen.c
--- a/libxkutil/xmlgen.c Thu Oct 02 12:54:29 2008 -0700
+++ b/libxkutil/xmlgen.c Thu Oct 02 14:11:39 2008 -0700
@@ -617,6 +617,16 @@
return strdup("<!-- unsupported domain type -->\n");
}
+static int console_xml(struct domain *dominfo,
+ char **xml)
+{
+ if (dominfo->type == DOMAIN_LXC) {
+ astrcat(xml, "<console type='pty'/>\n");
+ }
+
+ return 0;
+}
+
char *system_to_xml(struct domain *dominfo)
{
char *devxml = strdup("");
@@ -668,6 +678,8 @@
1,
graphics_to_xml);
+ console_xml(dominfo, &devxml);
+
concat_devxml(&sysdevxml,
dominfo->dev_mem,
dominfo->dev_mem_ct,