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

Peter Krempa pkrempa at redhat.com
Wed Oct 1 14:43:39 UTC 2014


On 10/01/14 16:23, Eric Blake wrote:
> 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.

That happens when you set up to fix the comment later ... Sigh.

> 
>> +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.

Thanks. Pushed.

Peter


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


More information about the libvir-list mailing list