[Libvirt-cim] [PATCH 0/3] Console Fixes and Enhancements
John Ferlan
jferlan at redhat.com
Wed Oct 2 15:13:21 UTC 2013
On 10/02/2013 11:04 AM, Viktor Mihajlovski wrote:
> On 10/02/2013 01:41 PM, John Ferlan wrote:
> ...
>>
>> Anyway, about the only concern I have is the applicability of the changes
>> in patch 2/3 to 'Virt_Device.c' in 'res_type_from_device_classname' at
>> least
>> with respect it be related to the console changes. It seems to be a
>> separate
>> issue unrelated to ConsoleDisplayController and should be its own patch.
> I actually made the issue by choosing the name of
> ConsoleDisplayController which is a superstring of DisplayController.
> I could move the strstr check of the longer string before
> the shorter one with the same result in a more compact
> patch.
It wasn't clear to me why the checks got an extra "_", eg:
- if (strstr(classname, "NetworkPort"))
+ if (strstr(classname, "_NetworkPort"))
I get the following:
- else if (strstr(classname, "DisplayController"))
+ else if (strstr(classname, "_DisplayController"))
return CIM_RES_TYPE_GRAPHICS;
- else if (strstr(classname, "PointingDevice"))
+ else if (strstr(classname, "_ConsoleDisplayController"))
+ return CIM_RES_TYPE_CONSOLE;
+ else if (strstr(classname, "_PointingDevice"))
But I'm OK witht the explanation.
John
>>
>> I also suppose in patch 3/3 the 'check_graphics' could change from a bool
>> to an int returning "pos" as -1 or >= 0 for it's location in list. But
>> that's just a minor thing.
> Now that you say it, this sounds more elegant...with the change
> discussed above this warrants a V2.
> I will be out returning Monday and will send out the revised version
> then.
> Thanks!
>
More information about the Libvirt-cim
mailing list