提交 ec8d5ce1 编写于 作者: N Nikolay Shirokovskiy 提交者: Maxim Nestratov

vz: add mode of unix socket serial device to xml dump

Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
上级 32cca278
...@@ -1077,6 +1077,7 @@ prlsdkGetSerialInfo(PRL_HANDLE serialPort, virDomainChrDefPtr chr) ...@@ -1077,6 +1077,7 @@ prlsdkGetSerialInfo(PRL_HANDLE serialPort, virDomainChrDefPtr chr)
PRL_UINT32 serialPortIndex; PRL_UINT32 serialPortIndex;
PRL_UINT32 emulatedType; PRL_UINT32 emulatedType;
char *friendlyName = NULL; char *friendlyName = NULL;
PRL_SERIAL_PORT_SOCKET_OPERATION_MODE socket_mode;
chr->deviceType = VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL; chr->deviceType = VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL;
chr->targetTypeAttr = false; chr->targetTypeAttr = false;
...@@ -1091,6 +1092,9 @@ prlsdkGetSerialInfo(PRL_HANDLE serialPort, virDomainChrDefPtr chr) ...@@ -1091,6 +1092,9 @@ prlsdkGetSerialInfo(PRL_HANDLE serialPort, virDomainChrDefPtr chr)
serialPort))) serialPort)))
goto error; goto error;
pret = PrlVmDevSerial_GetSocketMode(serialPort, &socket_mode);
prlsdkCheckRetGoto(pret, error);
switch (emulatedType) { switch (emulatedType) {
case PDT_USE_OUTPUT_FILE: case PDT_USE_OUTPUT_FILE:
chr->source.type = VIR_DOMAIN_CHR_TYPE_FILE; chr->source.type = VIR_DOMAIN_CHR_TYPE_FILE;
...@@ -1099,6 +1103,7 @@ prlsdkGetSerialInfo(PRL_HANDLE serialPort, virDomainChrDefPtr chr) ...@@ -1099,6 +1103,7 @@ prlsdkGetSerialInfo(PRL_HANDLE serialPort, virDomainChrDefPtr chr)
case PDT_USE_SERIAL_PORT_SOCKET_MODE: case PDT_USE_SERIAL_PORT_SOCKET_MODE:
chr->source.type = VIR_DOMAIN_CHR_TYPE_UNIX; chr->source.type = VIR_DOMAIN_CHR_TYPE_UNIX;
chr->source.data.nix.path = friendlyName; chr->source.data.nix.path = friendlyName;
chr->source.data.nix.listen = socket_mode == PSP_SERIAL_SOCKET_SERVER;
break; break;
case PDT_USE_REAL_DEVICE: case PDT_USE_REAL_DEVICE:
chr->source.type = VIR_DOMAIN_CHR_TYPE_DEV; chr->source.type = VIR_DOMAIN_CHR_TYPE_DEV;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册