[libvirt PATCH 3/3] conf: scheduler parser: do not hardcode element name
Pino Toscano
ptoscano at redhat.com
Mon Jul 27 13:41:39 UTC 2020
On Monday, 27 July 2020 15:15:46 CEST Ján Tomko wrote:
> When trying to parse an XML with overlapping iothread scheduler
> settings, the error message was rather confusing:
>
> error: iothreadssched attributes 'vcpus' must not overlap
>
> Pass the correct element name.
>
> Signed-off-by: Ján Tomko <jtomko at redhat.com>
> ---
> src/conf/domain_conf.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 0f12b54575..1179a27a00 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -20024,8 +20024,8 @@ virDomainThreadSchedParseHelper(xmlNodePtr node,
>
> if (sched->policy != VIR_PROC_POLICY_NONE) {
> virReportError(VIR_ERR_XML_DETAIL,
> - _("'%s' attributes 'vcpus' must not overlap"),
> - elementName);
> + _("'%s' attributes '%s' must not overlap"),
> + elementName, attributeName);
While I generally agree with this kind of changes, please note that
this is difficult in C: see:
https://www.gnu.org/software/gettext/manual/gettext.html#c_002dformat
--
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200727/4642dcdd/attachment-0001.sig>
More information about the libvir-list
mailing list