Re: [PATCH 4/5] remote generator: Make parsing stricter

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

 



2011/5/9 Eric Blake <eblake@xxxxxxxxxx>:
> On 05/07/2011 06:28 AM, Matthias Bolte wrote:
>> Anchor matches at the beginning of a line.
>>
>> Specialize some general matches.
>>
>> Add some comments to special cases.
>> ---
>> Âdaemon/remote_generator.pl | Â172 +++++++++++++++++++++++++++-----------------
>> Â1 files changed, 105 insertions(+), 67 deletions(-)
>>
>> @@ -510,13 +522,29 @@ elsif ($opt_b) {
>> Â Â Â Â Â Â Â Â Â Â Â}
>>
>> Â Â Â Â Â Â Â Â Â Â Âunshift(@args_list, $conn);
>> - Â Â Â Â Â Â Â Â} elsif ($ret_member =~ m/hyper (\S+);/) {
>> - Â Â Â Â Â Â Â Â Â Âpush(@vars_list, "unsigned long $1");
>> - Â Â Â Â Â Â Â Â Â Âpush(@ret_list, "ret->$1 = $1;");
>> - Â Â Â Â Â Â Â Â Â Â$single_ret_var = $1;
>> + Â Â Â Â Â Â Â Â} elsif ($ret_member =~ m/^(unsigned )?hyper (\S+);/) {
>> + Â Â Â Â Â Â Â Â Â Âmy $type_name;
>> + Â Â Â Â Â Â Â Â Â Âmy $ret_name = $2;
>> +
>> + Â Â Â Â Â Â Â Â Â Â$type_name = $1 if ($1);
>> + Â Â Â Â Â Â Â Â Â Â$type_name .= "long";
>> +
>> + Â Â Â Â Â Â Â Â Â Âif ($type_name eq "long" and
>> + Â Â Â Â Â Â Â Â Â Â Â Â$calls{$_}->{ProcName} =~ m/^Get(Lib)?Version$/) {
>> + Â Â Â Â Â Â Â Â Â Â Â Â# SPECIAL: virConnectGet(Lib)?Version uses unsigned long
>> + Â Â Â Â Â Â Â Â Â Â Â Â# Â Â Â Â Âin public API but hyper in XDR protocol
>> + Â Â Â Â Â Â Â Â Â Â Â Â$type_name = "unsigned long";
>> + Â Â Â Â Â Â Â Â Â Â}
>
> Fine for this patch, but we could probably clean it up to use unsigned
> hyper in XDR protocol with no change to the wire format as a separate patch.
>
>> @@ -928,7 +962,8 @@ elsif ($opt_k) {
>> Â Â Â Â Â}
>>
>> Â Â Â Â Âif ($call->{ProcName} eq "NWFilterDefineXML") {
>> - Â Â Â Â Â Â# fix public API and XDR protocol mismatch
>> + Â Â Â Â Â Â# SPECIAL: virNWFilterDefineXML has a flags parameter in the
>> + Â Â Â Â Â Â# Â Â Â Â Âpublic API that is missing in the XDR protocol
>> Â Â Â Â Â Â Âpush(@args_list, "unsigned int flags ATTRIBUTE_UNUSED");
>> Â Â Â Â Â}
>
> Ouch. ÂWe need to introduce a new XDR function number that fixes this,
> while keeping glue code in place for the old broken XDR function number
> (of course, as a separate patch).
>
> ACK.
>

Thanks, pushed.

Matthias

--
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]