}
static int
-virDomainChrTargetTypeFromString(virDomainChrDefPtr def,
- int devtype,
+virDomainChrTargetTypeFromString(int devtype,
const char *targetType)
{
int ret = -1;
break;
}
- def->targetTypeAttr = true;
-
return ret;
}
char *stateStr = NULL;
if ((def->targetType =
- virDomainChrTargetTypeFromString(def, def->deviceType,
+ virDomainChrTargetTypeFromString(def->deviceType,
targetType)) < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown target type '%s' specified for character device"),
break;
case VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL:
- if (src->targetTypeAttr != tgt->targetTypeAttr)
+ if (src->targetType != tgt->targetType)
return false;
ATTRIBUTE_FALLTHROUGH;
break;
case VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL:
- if (def->targetTypeAttr) {
+ if (def->targetType != VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE) {
virBufferAsprintf(buf,
"<target type='%s' port='%d'/>\n",
virDomainChrTargetTypeToString(def->deviceType,
struct _virDomainChrDef {
int deviceType; /* enum virDomainChrDeviceType */
- bool targetTypeAttr;
int targetType; /* enum virDomainChrConsoleTargetType ||
enum virDomainChrChannelTargetType ||
enum virDomainChrSerialTargetType according to deviceType */
int ret = -1;
chr->deviceType = VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL;
- chr->targetTypeAttr = false;
pret = PrlVmDev_GetIndex(serialPort, &serialPortIndex);
prlsdkCheckRetGoto(pret, cleanup);
chr->target.port = serialPortIndex;
return -1;
}
- if (chr->targetTypeAttr) {
+ if (chr->targetType != VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Specified character device target type is not "
"supported by vz driver."));
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</controller>
<serial type='dev'>
<source path='/dev/ttyS2'/>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='dev'>
<source path='/dev/ttyS2'/>
</controller>
<serial type='file'>
<source path='/tmp/serial.log'/>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='file'>
<source path='/tmp/serial.log'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<serial type='file'>
<source path='/tmp/serial.log'/>
- <target port='1'/>
+ <target type='isa-serial' port='1'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
<serial type='tcp'>
<source mode='bind' host='127.0.0.1' service='9999'/>
<protocol type='telnet'/>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='tcp'>
<source mode='bind' host='127.0.0.1' service='9999'/>
<serial type='tcp'>
<source mode='connect' host='127.0.0.1' service='9999'/>
<protocol type='raw'/>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='tcp'>
<source mode='connect' host='127.0.0.1' service='9999'/>
<serial type='udp'>
<source mode='bind' host='127.0.0.1' service='9999'/>
<source mode='connect' host='127.0.0.1' service='9998'/>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<serial type='udp'>
<source mode='connect' service='9999'/>
- <target port='1'/>
+ <target type='isa-serial' port='1'/>
</serial>
<console type='udp'>
<source mode='bind' host='127.0.0.1' service='9999'/>
</controller>
<serial type='unix'>
<source mode='connect' path='/tmp/serial.sock'/>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='unix'>
<source mode='connect' path='/tmp/serial.sock'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<serial type='vc'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='vc'>
<target type='serial' port='0'/>
<alias name='serial0'/>
</serial>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
<alias name='serial1'/>
</serial>
<serial type='tcp'>
<source mode='bind' host='0.0.0.0' service='2445'/>
<protocol type='raw'/>
- <target port='1'/>
+ <target type='isa-serial' port='1'/>
<alias name='serial2'/>
</serial>
<console type='pty'>
<alias name='serial0'/>
</serial>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
<alias name='serial1'/>
</serial>
<serial type='tcp'>
<source mode='bind' host='0.0.0.0' service='2445'/>
<protocol type='raw'/>
- <target port='1'/>
+ <target type='isa-serial' port='1'/>
<alias name='serial2'/>
</serial>
<console type='pty'>
<serial type='udp'>
<source mode='bind' host='127.0.0.1' service='1111'/>
<source mode='connect' host='127.0.0.1' service='2222'/>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<serial type='tcp'>
<source mode='connect' host='127.0.0.1' service='5555' tls='no'/>
<protocol type='raw'/>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='udp'>
<source mode='bind' host='127.0.0.1' service='1111'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
</interface>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<serial type='pty'>
- <target port='1'/>
+ <target type='isa-serial' port='1'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
<source path='/tmp/serial.file'>
<seclabel model='dac' relabel='no'/>
</source>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<serial type='unix'>
<source mode='connect' path='/tmp/serial.sock'>
<seclabel model='dac' relabel='no'/>
</source>
- <target port='1'/>
+ <target type='isa-serial' port='1'/>
</serial>
<console type='file'>
<source path='/tmp/serial.file'>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</controller>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
</interface>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<serial type='pty'>
- <target port='1'/>
+ <target type='isa-serial' port='1'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</interface>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</interface>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</interface>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</interface>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
<target index='0'/>
</controller>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
<address type='spapr-vio' reg='0x30000000'/>
</serial>
<console type='pty'>
<target index='0'/>
</controller>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
<address type='spapr-vio' reg='0x30000000'/>
</serial>
<console type='pty'>
<target index='0'/>
</controller>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
<address type='spapr-vio' reg='0x30000000'/>
</serial>
<console type='pty'>
<target index='0'/>
</controller>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
<address type='spapr-vio' reg='0x30000000'/>
</serial>
<console type='pty'>
<target index='0'/>
</controller>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
<address type='spapr-vio' reg='0x30000000'/>
</serial>
<console type='pty'>
<target index='0'/>
</controller>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
<address type='spapr-vio' reg='0x30000000'/>
</serial>
<console type='pty'>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</interface>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
<controller type='pci' index='0' model='pci-root'/>
<serial type='spiceport'>
<source channel='org.qemu.console.serial.0'/>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='spiceport'>
<source channel='org.qemu.console.serial.0'/>
<controller type='pci' index='0' model='pci-root'/>
<serial type='spiceport'>
<source channel='org.qemu.console.serial.0'/>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='spiceport'>
<source channel='org.qemu.console.serial.0'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<serial type='null'>
- <target port='1'/>
+ <target type='isa-serial' port='1'/>
</serial>
<serial type='stdio'>
- <target port='2'/>
+ <target type='isa-serial' port='2'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
<serial type='udp'>
<source mode='bind' host='127.0.0.1' service='1111'/>
<source mode='connect' host='127.0.0.1' service='2222'/>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<serial type='tcp'>
<source mode='connect' host='127.0.0.1' service='5555'/>
<protocol type='raw'/>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='udp'>
<source mode='bind' host='127.0.0.1' service='1111'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</interface>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
- <target port='0'/>
+ <target type='isa-serial' port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>