qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH v3] savevm: Really verify if a drive supports sn


From: Miguel Di Ciurcio Filho
Subject: [Qemu-devel] Re: [PATCH v3] savevm: Really verify if a drive supports snapshots
Date: Fri, 4 Jun 2010 14:46:43 -0300

On Fri, Jun 4, 2010 at 2:28 PM, Kevin Wolf <address@hidden> wrote:
>> @@ -1674,12 +1659,26 @@ void do_savevm(Monitor *mon, const QDict *qdict)
>>  #endif
>>      const char *name = qdict_get_try_str(qdict, "name");
>>
>> +    /* Verify if there is a device that doesn't support snapshots and is 
>> writable */
>> +    QTAILQ_FOREACH(dinfo, &drives, next) {
>> +        bs = dinfo->bdrv;
>> +
>> +        if (bdrv_is_removable(bs) || bdrv_is_read_only(bs)) {
>> +            continue;
>> +        }
>> +
>> +        if (!bdrv_can_snapshot(bs)) {
>> +            monitor_printf(mon, "Device '%s' is writable but does not 
>> support snapshots.\n",
>> +                               bdrv_get_device_name(bs));
>> +            goto the_end;
>
> cc1: warnings being treated as errors
> savevm.c: In Funktion »do_savevm«:
> savevm.c:1654: Fehler: »saved_vm_running« may be used uninitialized in
> this function
>
> return instead of goto the_end is probably the right thing to do here.
>

Strange. This warning did not happen with me.

Miguel



reply via email to

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