mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
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: Bob Liu <bob.liu@oracle.com>
This commit is contained in:
parent
846a1c6473
commit
faaebe1795
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user