[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] savevm: Really verify if a drive supports sn
From: |
Miguel Di Ciurcio Filho |
Subject: |
Re: [Qemu-devel] [PATCH v2] savevm: Really verify if a drive supports snapshots |
Date: |
Mon, 31 May 2010 09:29:30 -0300 |
On Mon, May 31, 2010 at 6:59 AM, Kevin Wolf <address@hidden> 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