static int
-xenParseCharDev(virConfPtr conf, virDomainDefPtr def)
+xenParseCharDev(virConfPtr conf, virDomainDefPtr def, const char *nativeFormat)
{
const char *str;
virConfValuePtr value = NULL;
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;
if (xenParseVfb(conf, def) < 0)
return -1;
- if (xenParseCharDev(conf, def) < 0)
+ if (xenParseCharDev(conf, def, nativeFormat) < 0)
return -1;
return 0;
static int
-xenFormatCharDev(virConfPtr conf, virDomainDefPtr def)
+xenFormatCharDev(virConfPtr conf, virDomainDefPtr def,
+ const char *nativeFormat)
{
size_t i;
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;
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)