[Qemu-devel] Re: [PATCH 4/7] Make error handling more consistent in img_create() and img_resize()

2010-12-06 Thread Jes Sorensen
On 12/06/10 16:57, Kevin Wolf wrote: > bdrv_delete doesn't check for NULL, so this still isn't enough. Try > something like "qemu-img resize -f vmdx foo +0" and you'll get a segfault. G :( It's a bummer things are so inconsistent throughout QEMU, most of the free() functions can handle it. U

[Qemu-devel] Re: [PATCH 4/7] Make error handling more consistent in img_create() and img_resize()

2010-12-06 Thread Kevin Wolf
Am 06.12.2010 16:45, schrieb jes.soren...@redhat.com: > From: Jes Sorensen > > Signed-off-by: Jes Sorensen > --- > qemu-img.c | 14 +- > 1 files changed, 9 insertions(+), 5 deletions(-) > @@ -1432,7 +1434,7 @@ static int img_resize(int argc, char **argv) > int c, ret, relati

[Qemu-devel] Re: [PATCH 4/7] Make error handling more consistent in img_create() and img_resize()

2010-12-06 Thread Jes Sorensen
On 12/06/10 16:25, Kevin Wolf wrote: >> } >> n = get_option_parameter(param, BLOCK_OPT_SIZE)->value.n; >> free_option_parameters(param); >> >> bs = bdrv_new_open(filename, fmt, BDRV_O_FLAGS | BDRV_O_RDWR); >> if (!bs) { >> -return 1; >> +ret = -1; >> +

[Qemu-devel] Re: [PATCH 4/7] Make error handling more consistent in img_create() and img_resize()

2010-12-06 Thread Kevin Wolf
Am 06.12.2010 15:25, schrieb jes.soren...@redhat.com: > From: Jes Sorensen > > Signed-off-by: Jes Sorensen > --- > qemu-img.c | 12 > 1 files changed, 8 insertions(+), 4 deletions(-) > > diff --git a/qemu-img.c b/qemu-img.c > index aded72d..7f4939e 100644 > --- a/qemu-img.c > ++

[Qemu-devel] Re: [PATCH 4/7] Make error handling more consistent in img_create() and img_resize()

2010-12-06 Thread Stefan Hajnoczi
On Mon, Dec 06, 2010 at 03:25:37PM +0100, jes.soren...@redhat.com wrote: > From: Jes Sorensen > > Signed-off-by: Jes Sorensen > --- > qemu-img.c | 12 > 1 files changed, 8 insertions(+), 4 deletions(-) Reviewed-by: Stefan Hajnoczi