Displaying 2 results from an estimated 2 matches for "20eabe3".
2015 Jul 06
1
[PATCH] uuids: return ENOTSUP if could not set UUID for specific fs
Signed-off-by: Chen Hanxiao <chenhanxiao@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 ...
2015 Jul 02
1
[PATCH v6] New API: set_uuid_random
...6 +159,12 @@ do_set_e2uuid (const char *device, const char *uuid)
return 0;
}
+int
+ext_set_uuid_random (const char *device)
+{
+ return do_set_e2uuid (device, "random");
+}
+
char *
do_get_e2uuid (const char *device)
{
diff --git a/daemon/uuids.c b/daemon/uuids.c
index 5238f3e..20eabe3 100644
--- a/daemon/uuids.c
+++ b/daemon/uuids.c
@@ -85,3 +85,35 @@ do_set_uuid (const char *device, const char *uuid)
return r;
}
+
+int
+do_set_uuid_random (const char *device)
+{
+ int r;
+
+ /* How we set the UUID depends on the filesystem type. */
+ CLEANUP_FREE char *vfs_type = get_b...