Skip to content

Commit

Permalink
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Browse files Browse the repository at this point in the history
* kwolf/for-anthony:
  qemu-img: Fix segmentation fault
  qcow2: Don't ignore failure to clear autoclear flags
  coroutine: Fix setup of sigaltstack coroutines
  • Loading branch information
Anthony Liguori committed May 14, 2012
2 parents 981b162 + fa170c1 commit 9cc3177
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion block/qcow2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion coroutine-sigaltstack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 3 additions & 1 deletion qemu-img.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 *));
Expand Down

0 comments on commit 9cc3177

Please sign in to comment.