[libvirt] [PATCH] esx: Mark error message in macros for translation
Eric Blake
eblake at redhat.com
Mon Apr 11 17:32:02 UTC 2011
On 04/10/2011 05:28 AM, Matthias Bolte wrote:
> ---
> src/esx/esx_vi_types.c | 20 ++++++++++----------
> 1 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/src/esx/esx_vi_types.c b/src/esx/esx_vi_types.c
> index 9e23030..29a3c39 100644
> --- a/src/esx/esx_vi_types.c
> +++ b/src/esx/esx_vi_types.c
> @@ -77,12 +77,12 @@
> int \
> esxVI_##__type##_Validate(esxVI_##__type *item) \
> { \
> - const char *type_name = esxVI_Type_ToString(esxVI_Type_##__type); \
> + const char *typeName = esxVI_Type_ToString(esxVI_Type_##__type); \
> \
> if (item->_type <= esxVI_Type_Undefined || \
> item->_type >= esxVI_Type_Other) { \
> ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, \
> - "%s object has invalid dynamic type", type_name); \
> + _("%s object has invalid dynamic type"), typeName); \
Hmm, cfg.mk already included ESX_VI_ERROR in the list of
msg_gen_function that should have caught this at 'make syntax-check'
time; I wonder why it was being overlooked. Oh, probably because
sc_libvirt_unmarked_diagnostics states that it won't find lines where
the format string is on a separate line. Same goes for
sc_unmarked_diagnostics from gnulib's maint.mk; wonder if there's a way
to improve the syntax checker.
At any rate, ACK.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110411/3c8b7574/attachment-0001.sig>
More information about the libvir-list
mailing list