[2/3] cleanup: del_existing_snapshots() must return the upstream error code

Submitted by Miguel Di Ciurcio Filho on July 28, 2010, 7:30 p.m.

Details

Message ID 1280345424-12918-3-git-send-email-miguel.filho@gmail.com
State New
Headers show

Commit Message

Miguel Di Ciurcio Filho July 28, 2010, 7:30 p.m.
Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 savevm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Markus Armbruster July 30, 2010, 9:45 a.m.
Why?

I figure the next patch wants it, but if that's the reason, the commit
message should state it.
Miguel Di Ciurcio Filho July 30, 2010, 8:28 p.m.
On Fri, Jul 30, 2010 at 6:45 AM, Markus Armbruster <armbru@redhat.com> wrote:
> Why?
>
> I figure the next patch wants it, but if that's the reason, the commit
> message should state it.
>

To better identify what happened and where, IMHO.
Markus Armbruster Aug. 2, 2010, 11:06 a.m.
Miguel Di Ciurcio Filho <miguel.filho@gmail.com> writes:

> On Fri, Jul 30, 2010 at 6:45 AM, Markus Armbruster <armbru@redhat.com> wrote:
>> Why?
>>
>> I figure the next patch wants it, but if that's the reason, the commit
>> message should state it.
>>
>
> To better identify what happened and where, IMHO.

To let the *next* patch do a better job.  That's not obvious from this
patch, so better state it.

Patch hide | download patch | download mbox

diff --git a/savevm.c b/savevm.c
index 6c6adb0..fb38e8a 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1775,7 +1775,7 @@  static int del_existing_snapshots(Monitor *mon, const char *name)
                 monitor_printf(mon,
                                "Error while deleting snapshot on '%s'\n",
                                bdrv_get_device_name(bs));
-                return -1;
+                return ret;
             }
         }
     }