diff options
author | Kevin Wolf | 2017-01-20 17:07:26 +0100 |
---|---|---|
committer | Kevin Wolf | 2017-02-28 20:40:36 +0100 |
commit | 6d0eb64d5c6d57017c52a4f36ccae1db79215ee1 (patch) | |
tree | ac53990a1e31ff6232f31cb8c9d3a322e960fb4b /block/backup.c | |
parent | block: Add permissions to BlockBackend (diff) | |
download | qemu-6d0eb64d5c6d57017c52a4f36ccae1db79215ee1.tar.gz qemu-6d0eb64d5c6d57017c52a4f36ccae1db79215ee1.tar.xz qemu-6d0eb64d5c6d57017c52a4f36ccae1db79215ee1.zip |
block: Add permissions to blk_new()
We want every user to be specific about the permissions it needs, so
we'll pass the initial permissions as parameters to blk_new(). A user
only needs to call blk_set_perm() if it wants to change the permissions
after the fact.
The permissions are stored in the BlockBackend and applied whenever a
BlockDriverState should be attached in blk_insert_bs().
This does not include actually choosing the right set of permissions
everywhere yet. Instead, the usual FIXME comment is added to each place
and will be addressed in individual patches.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Acked-by: Fam Zheng <famz@redhat.com>
Diffstat (limited to 'block/backup.c')
-rw-r--r-- | block/backup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/block/backup.c b/block/backup.c index fe010e78e3..4b3c94c812 100644 --- a/block/backup.c +++ b/block/backup.c @@ -624,7 +624,8 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs, goto error; } - job->target = blk_new(); + /* FIXME Use real permissions */ + job->target = blk_new(0, BLK_PERM_ALL); blk_insert_bs(job->target, target); job->on_source_error = on_source_error; |