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

login
register
mail settings
Submitter Miguel Di Ciurcio Filho
Date July 28, 2010, 7:30 p.m.
Message ID <1280345424-12918-3-git-send-email-miguel.filho@gmail.com>
Download mbox | patch
Permalink /patch/60172/
State New
Headers show

Comments

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(-)
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

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;
             }
         }
     }