[libvirt] [PATCH] maint: Prohibit "devname" by a syntax check rules

Eric Blake eblake at redhat.com
Wed Oct 1 14:23:41 UTC 2014


On 10/01/2014 08:14 AM, Peter Krempa wrote:
> and tweak the code to avoid using it.
> ---
>  cfg.mk                                 | 12 ++++++++++++
>  include/libvirt/libvirt.h.in           |  2 +-
>  src/conf/interface_conf.c              | 10 +++++-----
>  src/conf/interface_conf.h              |  2 +-
>  src/interface/interface_backend_udev.c |  2 +-
>  src/qemu/qemu_monitor.c                |  4 ++--
>  src/qemu/qemu_monitor.h                |  6 +++---
>  src/util/virfile.c                     |  6 +++---
>  tools/virsh-domain.c                   |  4 ++--
>  tools/virt-host-validate-common.h      |  2 +-
>  10 files changed, 31 insertions(+), 19 deletions(-)
> 
> diff --git a/cfg.mk b/cfg.mk
> index ed7123b..8e99d04 100644
> --- a/cfg.mk
> +++ b/cfg.mk
> @@ -962,6 +962,15 @@ sc_prohibit_paren_brace:
>  	halt='Put space between closing parenthesis and opening brace'	\
>  	  $(_sc_search_regexp)
> 
> +# Look for diagnostics that aren't marked for translation.
> +# This won't find any for which error's format string is on a separate line.
> +# The sed filters eliminate false-positives like these:

Comment is wrong.

> +sc_prohibit_devname:
> +	@prohibit='\bdevname\b'			\
> +	exclude='sc_prohibit_devname'	\
> +	halt='avoid using 'devname' as FreeBSD exports the symbol'	\
> +	  $(_sc_search_regexp)

Alignment of \ looks odd, but the rule itself looks okay.

ACK with that cleaned up.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141001/ec7081c4/attachment-0001.sig>


More information about the libvir-list mailing list