[Libguestfs] [PATCH v4 1/7] uuid: add support to change uuid of btrfs partition

Pino Toscano ptoscano at redhat.com
Tue Jun 30 14:04:33 UTC 2015


Hi,

In data martedì 30 giugno 2015 19:23:08, Chen Hanxiao ha scritto:
> +int
> +btrfs_set_uuid (const char *device, const char *uuid)
> +{
> +  CLEANUP_FREE char *err = NULL;
> +  int r;
> +  int has_uuid_opts = test_btrfstune_uuid_opt ();
> +
> +  if (has_uuid_opts <= 0) {
> +    reply_with_error_errno (ENOTSUP, "btrfs filesystems' UUID cannot be changed");
> +    return -1;
> +  }

Forgot one thing here: you can use a NOT_SUPPORTED(-1, "btrfs ...") macro here.

-- 
Pino Toscano




More information about the Libguestfs mailing list