[Libguestfs] [PATCH 2/3] uuid: cannot change btrfs filesystem's UUID

Hu Tao hutao at cn.fujitsu.com
Fri Nov 28 07:58:06 UTC 2014


Signed-off-by: Hu Tao <hutao at cn.fujitsu.com>
---
 daemon/uuids.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/daemon/uuids.c b/daemon/uuids.c
index 431d867..06b33e9 100644
--- a/daemon/uuids.c
+++ b/daemon/uuids.c
@@ -110,6 +110,11 @@ do_set_uuid (const char *device, const char *uuid)
   else if (STREQ (vfs_type, "swap"))
     r = swapuuid (device, uuid);
 
+  else if (STREQ (vfs_type, "btrfs")) {
+    reply_with_error ("btrfs filesystems' UUID cannot be changed");
+    r = -1;
+  }
+
   else {
     reply_with_error ("don't know how to set the UUID for '%s' filesystems",
                       vfs_type);
-- 
1.9.3




More information about the Libguestfs mailing list