On Mon, May 31, 2010 at 6:59 AM, Kevin Wolf <kw...@redhat.com> wrote:
>>  int bdrv_snapshot_create(BlockDriverState *bs,
>>                           QEMUSnapshotInfo *sn_info)
>>  {
>>      BlockDriver *drv = bs->drv;
>> -    if (!drv)
>> -        return -ENOMEDIUM;
>> -    if (!drv->bdrv_snapshot_create)
>> -        return -ENOTSUP;
>> -    return drv->bdrv_snapshot_create(bs, sn_info);
>> +    if (bdrv_can_snapshot(bs)) {
>> +        return drv->bdrv_snapshot_create(bs, sn_info);
>> +    }
>> +
>> +    return -1;
>
> Not -ENOTSUP as before?

Oops, I will leave as it was before.

>>
>> -    if (load_vmstate(name) >= 0 && saved_vm_running)
>> +    if (load_vmstate(name) >= 0 && saved_vm_running) {
>>          vm_start();
>> +    } else {
>> +        monitor_printf(mon, "Failed to load VM state. VM stopped.\n");
>> +    }
>
> If the VM was stopped before, this will print the error message even if
> everything went fine.

Same here, I will leave as it was before. Luiz is cooking something
for this area AFAIK.

Thanks

Reply via email to