qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PULL 03/34] bootindex: add del_boot_device_path functi


From: Gonglei
Subject: Re: [Qemu-devel] [PULL 03/34] bootindex: add del_boot_device_path function
Date: Thu, 16 Oct 2014 18:11:17 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1

On 2014/10/16 18:04, Peter Maydell wrote:

> On 15 October 2014 11:05, Gerd Hoffmann <address@hidden> wrote:
>> From: Gonglei <address@hidden>
>>
>> Introduce del_boot_device_path() to clean up fw_cfg content when
>> hot-unplugging a device that refers to a bootindex or update a
>> existent devcie's bootindex.
> 
>> +void del_boot_device_path(DeviceState *dev, const char *suffix)
>> +{
>> +    FWBootEntry *i;
>> +
>> +    if (dev == NULL) {
>> +        return;
>> +    }
>> +
>> +    QTAILQ_FOREACH(i, &fw_boot_order, link) {
>> +        if ((!suffix || !g_strcmp0(i->suffix, suffix)) &&
> 
> I've just noticed that this won't build with our minimum
> required glib version: g_strcmp0 wasn't introduced
> until glib 2.16.
> 
> It should be fairly easy to provide a back-compat implementation
> in our glib-compat.h header, or you could just rephrase this
> to work with the usual strcmp, since you're already doing a
> manual NULL check on one of the arguments.
> 

OK, thanks for your point, Peter.
I'll post a patch to fix this problem :)

Best regards,
-Gonglei




reply via email to

[Prev in Thread] Current Thread [Next in Thread]