hink just returning error codes to the client is far too little
information. I don't think we need the fully normalized structure
that Luiz originally proposed with bus/dev addresses split out, but
we certainly need to include a string description giving as much
detail as possible. If attaching a host USB device failed, I don't
want a single error code QERR_OPEN_FAILED, nor a generic message
like 'could not open device', i want the exact details, eg
'could not open device: permission denied'
'could not open device: no such file or directory'
'could not open device: device or resource busy'
The localization issue is somewhat of a red herring though. This string
description is not something that clients would ultimately expose to the
user. The client apps would likely present a more generic error message
to the user, based off the error code. The error description received
from QEMU will instead be written out to the logs as a record for later
troubleshooting. eg if the user files a bug report, it will include the
full error details, so libvirt/qemu maintainers have a better chance of
figuring out what went wrong.