aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-05-14 12:45:01 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2012-05-14 12:45:01 -0500
commit9cc31772bf45a3002fd3886e32ab31f9b396b4da (patch)
tree0c0c0ecc8239ab3081ec8870d6c858d341a78cc7
parent981b1628b3430a21cf1c76d6acd7c883c86fceb2 (diff)
parentfa170c148b12f40e803af5b442d33f16add345a4 (diff)
Merge remote-tracking branch 'kwolf/for-anthony' into staging
* kwolf/for-anthony: qemu-img: Fix segmentation fault qcow2: Don't ignore failure to clear autoclear flags coroutine: Fix setup of sigaltstack coroutines
-rw-r--r--block/qcow2.c5
-rw-r--r--coroutine-sigaltstack.c2
-rw-r--r--qemu-img.c4
3 files changed, 8 insertions, 3 deletions
diff --git a/block/qcow2.c b/block/qcow2.c
index 3bae2d837e..655799c6a0 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -300,7 +300,10 @@ static int qcow2_open(BlockDriverState *bs, int flags)
if (!bs->read_only && s->autoclear_features != 0) {
s->autoclear_features = 0;
- qcow2_update_header(bs);
+ ret = qcow2_update_header(bs);
+ if (ret < 0) {
+ goto fail;
+ }
}
/* Check support for various header values */
diff --git a/coroutine-sigaltstack.c b/coroutine-sigaltstack.c
index 7fa2e85540..861e87805a 100644
--- a/coroutine-sigaltstack.c
+++ b/coroutine-sigaltstack.c
@@ -226,7 +226,7 @@ static Coroutine *coroutine_new(void)
* called.
*/
coTS->tr_called = 0;
- kill(getpid(), SIGUSR2);
+ pthread_kill(pthread_self(), SIGUSR2);
sigfillset(&sigs);
sigdelset(&sigs, SIGUSR2);
while (!coTS->tr_called) {
diff --git a/qemu-img.c b/qemu-img.c
index 5434ddc5ee..c8a70ffc93 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -712,6 +712,9 @@ static int img_convert(int argc, char **argv)
out_filename = argv[argc - 1];
+ /* Initialize before goto out */
+ qemu_progress_init(progress, 2.0);
+
if (options && !strcmp(options, "?")) {
ret = print_block_option_help(out_filename, out_fmt);
goto out;
@@ -724,7 +727,6 @@ static int img_convert(int argc, char **argv)
goto out;
}
- qemu_progress_init(progress, 2.0);
qemu_progress_print(0, 100);
bs = g_malloc0(bs_n * sizeof(BlockDriverState *));