mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
Don't list <console> tag in serial list if primary console is not PTY.
This commit is contained in:
parent
c5f9c7dbe8
commit
6658f4fe40
@ -711,27 +711,31 @@ class vmmDomain(gobject.GObject):
|
||||
if child.name == "source":
|
||||
source_path = child.prop("path")
|
||||
|
||||
serial_list.append([name, dev_type, source_path])
|
||||
serial_list.append([name, dev_type, source_path, target_port])
|
||||
|
||||
for node in cdevs:
|
||||
name = "Serial Console"
|
||||
dev_type = "pty"
|
||||
source_path = None
|
||||
target_port = -1
|
||||
inuse = False
|
||||
|
||||
for child in node.children:
|
||||
if child.name == "source":
|
||||
source_path = child.prop("path")
|
||||
break
|
||||
|
||||
if source_path:
|
||||
if child.name == "target":
|
||||
target_port = child.prop("port")
|
||||
|
||||
if target_port != -1:
|
||||
for dev in serial_list:
|
||||
if source_path == dev[2]:
|
||||
if target_port == dev[3]:
|
||||
inuse = True
|
||||
break
|
||||
|
||||
if not inuse:
|
||||
serial_list.append([name, dev_type, source_path])
|
||||
serial_list.append([name, dev_type, source_path,
|
||||
target_port])
|
||||
|
||||
return serial_list
|
||||
return self._parse_device_xml(_parse_serial_consoles)
|
||||
|
Loading…
Reference in New Issue
Block a user