[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 33/54] block: Include details on permission erro
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH 33/54] block: Include details on permission errors in message |
Date: |
Fri, 24 Feb 2017 16:41:39 +0800 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Tue, 02/21 15:58, Kevin Wolf wrote:
> Instead of just telling that there was some conflict, we can be specific
> and tell which permissions were in conflict and which way the conflict
> is.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block.c | 67
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------
> 1 file changed, 56 insertions(+), 11 deletions(-)
>
> diff --git a/block.c b/block.c
> index 19cf3b0..a8a2fa7 100644
> --- a/block.c
> +++ b/block.c
> @@ -1461,6 +1461,43 @@ static void bdrv_update_perm(BlockDriverState *bs)
> bdrv_set_perm(bs, cumulative_perms, cumulative_shared_perms);
> }
>
> +static char *bdrv_child_user(BdrvChild *c)
Poor function name IMHO, maybe bdrv_child_user_desc() or
bdrv_child_owner_desc()?
> +{
> + if (c->role->get_parent_desc) {
> + return c->role->get_parent_desc(c);
> + }
> +
> + return g_strdup("another user");
> +}
- [Qemu-devel] [PATCH 24/54] block: Add permissions to blk_new(), (continued)
- [Qemu-devel] [PATCH 24/54] block: Add permissions to blk_new(), Kevin Wolf, 2017/02/21
- [Qemu-devel] [PATCH 25/54] block: Add error parameter to blk_insert_bs(), Kevin Wolf, 2017/02/21
- [Qemu-devel] [PATCH 26/54] block: Add BDRV_O_RESIZE for blk_new_open(), Kevin Wolf, 2017/02/21
- [Qemu-devel] [PATCH 34/54] block: Add BdrvChildRole.stay_at_node, Kevin Wolf, 2017/02/21
- [Qemu-devel] [PATCH 28/54] block: Allow error return in BlockDevOps.change_media_cb(), Kevin Wolf, 2017/02/21
- [Qemu-devel] [PATCH 33/54] block: Include details on permission errors in message, Kevin Wolf, 2017/02/21
- [Qemu-devel] [PATCH 32/54] block: Add BdrvChildRole.get_parent_desc(), Kevin Wolf, 2017/02/21
- [Qemu-devel] [PATCH 31/54] blockjob: Add permissions to block_job_create(), Kevin Wolf, 2017/02/21
- [Qemu-devel] [PATCH 30/54] hw/block: Introduce share-rw qdev property, Kevin Wolf, 2017/02/21
- [Qemu-devel] [PATCH 29/54] hw/block: Request permissions, Kevin Wolf, 2017/02/21
- [Qemu-devel] [PATCH 35/54] blockjob: Add permissions to block_job_add_bdrv(), Kevin Wolf, 2017/02/21