提交 faaebe17 编写于 作者: B Bob Liu 提交者: Jim Fehlig

xenconfig: rm format/parse multi serial for xen-xm

xen-xm doesn't support multi serial at all, this patch drop the
domXML <-> xl.cfg conversions.
Signed-off-by: NBob Liu <bob.liu@oracle.com>
上级 846a1c64
......@@ -723,7 +723,7 @@ xenParseVfb(virConfPtr conf, virDomainDefPtr def)
static int
xenParseCharDev(virConfPtr conf, virDomainDefPtr def)
xenParseCharDev(virConfPtr conf, virDomainDefPtr def, const char *nativeFormat)
{
const char *str;
virConfValuePtr value = NULL;
......@@ -751,6 +751,12 @@ xenParseCharDev(virConfPtr conf, virDomainDefPtr def)
if (value && value->type == VIR_CONF_LIST) {
int portnum = -1;
if (STREQ(nativeFormat, XEN_CONFIG_FORMAT_XM)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Multiple serial devices are not supported by xen-xm"));
goto cleanup;
}
value = value->list;
while (value) {
char *port = NULL;
......@@ -1095,7 +1101,7 @@ xenParseConfigCommon(virConfPtr conf,
if (xenParseVfb(conf, def) < 0)
return -1;
if (xenParseCharDev(conf, def) < 0)
if (xenParseCharDev(conf, def, nativeFormat) < 0)
return -1;
return 0;
......@@ -1453,7 +1459,8 @@ xenFormatEventActions(virConfPtr conf, virDomainDefPtr def)
static int
xenFormatCharDev(virConfPtr conf, virDomainDefPtr def)
xenFormatCharDev(virConfPtr conf, virDomainDefPtr def,
const char *nativeFormat)
{
size_t i;
......@@ -1493,6 +1500,12 @@ xenFormatCharDev(virConfPtr conf, virDomainDefPtr def)
int maxport = -1, port;
virConfValuePtr serialVal = NULL;
if (STREQ(nativeFormat, XEN_CONFIG_FORMAT_XM)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Multiple serial devices are not supported by xen-xm"));
return -1;
}
if (VIR_ALLOC(serialVal) < 0)
return -1;
......@@ -1849,7 +1862,7 @@ xenFormatConfigCommon(virConfPtr conf,
if (xenFormatPCI(conf, def) < 0)
return -1;
if (xenFormatCharDev(conf, def) < 0)
if (xenFormatCharDev(conf, def, nativeFormat) < 0)
return -1;
if (xenFormatSound(conf, def) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册