[libvirt] [PATCH 01/48] Avoid strcase check for virsh-*.c

Eric Blake eblake at redhat.com
Mon Aug 13 23:41:37 UTC 2012


On 08/03/2012 09:48 AM, Osier Yang wrote:
> The is a preparation patch, all the files listed in _virsh_avoid_strcase
> will use strcasecmp to sort the objects.
> ---
>  cfg.mk |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/cfg.mk b/cfg.mk
> index e2af2bb..871e50a 100644
> --- a/cfg.mk
> +++ b/cfg.mk
> @@ -736,7 +736,10 @@ $(srcdir)/src/remote/remote_client_bodies.h: $(srcdir)/src/remote/remote_protoco
>  	$(MAKE) -C src remote/remote_client_bodies.h
>  
>  # List all syntax-check exemptions:
> -exclude_file_name_regexp--sc_avoid_strcase = ^tools/virsh(-domain-monitor|-snapshot)?\.c$$
> +# maint.mk: don't use raw strcase functions (use c-strcase instead)
> +
> +_virsh_avoid_strcase=(-domain-monitor|-volume|-pool|-network|-interface|-nwfilter|-secret|-snapshot|-nodedev)
> +exclude_file_name_regexp--sc_avoid_strcase = ^tools/virsh$(_virsh_avoid_strcase)?\.c$$

That's a lot of files.  Would it be easier to write a helper function
living in virsh.c, which all of the other files can call, so that only
virsh.c has to be exempt?

-- 
Eric Blake   eblake at 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: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120813/811db72c/attachment-0001.sig>


More information about the libvir-list mailing list