[Libguestfs] [PATCH] uuids: return ENOTSUP if could not set UUID for specific fs
Pino Toscano
ptoscano at redhat.com
Tue Jul 7 08:17:00 UTC 2015
On Monday 06 July 2015 13:34:06 Chen Hanxiao wrote:
> Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> ---
> daemon/uuids.c | 6 ++----
> generator/actions.ml | 3 +++
> 2 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/daemon/uuids.c b/daemon/uuids.c
> index 20eabe3..00c47d8 100644
> --- a/daemon/uuids.c
> +++ b/daemon/uuids.c
> @@ -77,11 +77,9 @@ do_set_uuid (const char *device, const char *uuid)
> else if (STREQ (vfs_type, "btrfs"))
> r = btrfs_set_uuid (device, uuid);
>
> - else {
> - reply_with_error ("don't know how to set the UUID for '%s' filesystems",
> + else
> + NOT_SUPPORTED(-1, "don't know how to set the UUID for '%s' filesystems",
> vfs_type);
> - r = -1;
> - }
>
> return r;
> }
> diff --git a/generator/actions.ml b/generator/actions.ml
> index 92f80d2..7ecaf98 100644
> --- a/generator/actions.ml
> +++ b/generator/actions.ml
> @@ -11804,6 +11804,9 @@ parameter. In future we may allow other flags to be adjusted." };
> shortdesc = "set the filesystem UUID";
> longdesc = "\
> Set the filesystem UUID on C<device> to C<uuid>.
> +If this fails and the errno is ENOTSUP,
> +means that there is no support for changing the UUID
> +for the type of the specified filesystem.
>
> Only some filesystem types support setting UUIDs.
LGTM, pushed.
Thanks,
--
Pino Toscano
More information about the Libguestfs
mailing list