mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-09 09:14:57 +00:00
Display nicer error message for unsupported chardev hotplug
Use the device type name if we know it instead of its number, even if we can't hotplug it: qemuMonitorJSONAttachCharDevCommand:6094 : operation failed: Unsupported char device type '10'
This commit is contained in:
parent
b987684ff6
commit
cce8e5f739
@ -5955,9 +5955,15 @@ qemuMonitorJSONAttachCharDevCommand(const char *chrID,
|
||||
case VIR_DOMAIN_CHR_TYPE_STDIO:
|
||||
case VIR_DOMAIN_CHR_TYPE_NMDM:
|
||||
case VIR_DOMAIN_CHR_TYPE_LAST:
|
||||
if (virDomainChrTypeToString(chr->type)) {
|
||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||
_("Unsupported char device type '%d'"),
|
||||
_("Hotplug unsupported for char device type '%s'"),
|
||||
virDomainChrTypeToString(chr->type));
|
||||
} else {
|
||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||
_("Hotplug unsupported for char device type '%d'"),
|
||||
chr->type);
|
||||
}
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user