mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
Ask for read-write permissions when opening files
Found some places that seems needs this explicitly, now that read-write is not the default. Signed-off-by: Naphtali Sprei <nsprei@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
37226ad946
commit
058fc8c768
3 changed files with 4 additions and 4 deletions
|
@ -998,7 +998,7 @@ exit:
|
|||
if (prealloc) {
|
||||
BlockDriverState *bs;
|
||||
bs = bdrv_new("");
|
||||
bdrv_open(bs, filename, BDRV_O_CACHE_WB);
|
||||
bdrv_open(bs, filename, BDRV_O_CACHE_WB | BDRV_O_RDWR);
|
||||
preallocate(bs);
|
||||
bdrv_close(bs);
|
||||
}
|
||||
|
|
|
@ -2792,7 +2792,7 @@ static int enable_write_target(BDRVVVFATState *s)
|
|||
if (bdrv_create(bdrv_qcow, s->qcow_filename, options) < 0)
|
||||
return -1;
|
||||
s->qcow = bdrv_new("");
|
||||
if (s->qcow == NULL || bdrv_open(s->qcow, s->qcow_filename, 0) < 0)
|
||||
if (s->qcow == NULL || bdrv_open(s->qcow, s->qcow_filename, BDRV_O_RDWR) < 0)
|
||||
return -1;
|
||||
|
||||
#ifndef _WIN32
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue