[Libguestfs] [PATCH 5/5] labels: return ENOTSUP if could not set label for specific fs

Pino Toscano ptoscano at redhat.com
Wed Jul 8 08:01:32 UTC 2015


Hi,

On Wednesday 08 July 2015 11:07:51 Chen Hanxiao wrote:
> Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> ---
>  daemon/labels.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/daemon/labels.c b/daemon/labels.c
> index 92d339c..a1a2f3b 100644
> --- a/daemon/labels.c
> +++ b/daemon/labels.c
> @@ -85,11 +85,9 @@ do_set_label (const mountable_t *mountable, const char *label)
>    else if (STREQ (vfs_type, "xfs"))
>      r = xfslabel (mountable->device, label);
>  
> -  else {
> -    reply_with_error ("don't know how to set the label for '%s' filesystems",
> +  else
> +    NOT_SUPPORTED(-1, "don't know how to set the label for '%s' filesystems",
>                        vfs_type);
> -    r = -1;
> -  }
>  
>    return r;
>  }

Can you please also amend the documentation for set_label, to mention
this error case?

Thanks,
-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20150708/83cd7c6a/attachment.sig>


More information about the Libguestfs mailing list