[libvirt] [PATCH 4/6 V4] inject-nmi: Implementing the remote protocol

Matthias Bolte matthias.bolte at googlemail.com
Tue May 10 18:17:40 UTC 2011


2011/5/10 Eric Blake <eblake at redhat.com>:
> On 05/10/2011 02:26 AM, Lai Jiangshan wrote:
>> ---
>>  daemon/remote_generator.pl   |    2 +-
>>  src/remote/remote_driver.c   |    2 +-
>>  src/remote/remote_protocol.x |    8 +++++++-
>>  src/remote_protocol-structs  |    4 ++++
>>  4 files changed, 13 insertions(+), 3 deletions(-)
>>
>> diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl
>> index 062ccc1..74fa769 100755
>> --- a/daemon/remote_generator.pl
>> +++ b/daemon/remote_generator.pl
>> @@ -35,7 +35,7 @@ sub name_to_ProcName {
>>      @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/;
>> -                   $_ } @elems;
>> +                   $_ =~ s/Nmi/NMI/; $_ } @elems;
>
> Do we really want yet another difference in spelling?  But cleaning that
> up affects more than just your new API, so I'll leave it for a later patch.
>

Actually the problem is different here. name_to_ProcName takes the
procedure name (that is all uppercase) and splits it on underscores
into words, then turns all words into all lowercase and finally make
the first letter uppercase again. This is why NMI and up as Nmi and
needs to be fixed afterwards. If you have a better solution for this
I'd like to see it.

Matthias




More information about the libvir-list mailing list