Re: [PATCH] Fix rpc generator to anchor matches for method names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/19/2012 07:21 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> The RPC generator transforms methods matching certain
> patterns like 'id' or 'uuid', etc but does not anchor
> its matches to the end of the word. So if a method
> contains 'id' in the middle (eg virIdentity) then the
> RPC generator munges that.
> 
> * src/rpc/gendispatch.pl: Anchor matches
> ---
>  src/rpc/gendispatch.pl |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl
> index b36ca69..0460fca 100755
> --- a/src/rpc/gendispatch.pl
> +++ b/src/rpc/gendispatch.pl
> @@ -34,10 +34,10 @@ sub name_to_ProcName {
>      my $name = shift;
>      my @elems = split /_/, $name;
>      @elems = map ucfirst, @elems;
> -    @elems = map { $_ =~ s/Nwfilter/NWFilter/; $_ =~ s/Xml/XML/;
> -                   $_ =~ s/Uri/URI/; $_ =~ s/Uuid/UUID/; $_ =~ s/Id/ID/;
> -                   $_ =~ s/Mac/MAC/; $_ =~ s/Cpu/CPU/; $_ =~ s/Os/OS/;
> -                   $_ =~ s/Nmi/NMI/; $_ } @elems;
> +    @elems = map { $_ =~ s/Nwfilter/NWFilter/; $_ =~ s/Xml$/XML/;
> +                   $_ =~ s/Uri$/URI/; $_ =~ s/Uuid$/UUID/; $_ =~ s/Id$/ID/;
> +                   $_ =~ s/Mac$/MAC/; $_ =~ s/Cpu$/CPU/; $_ =~ s/Os$/OS/;
> +                   $_ =~ s/Nmi$/NMI/; $_ } @elems;

ACK.

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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]