Displaying 10 results from an estimated 10 matches for "do_set_uuid_random".
2015 Jul 02
1
[PATCH v6] New API: set_uuid_random
...uuid (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_blkid_tag (device, "TYPE");
+ if (vfs_type == NULL)
+ return -1;
+
+ CLEANUP_FREE char *uuid_random = get_random_uuid ();
+ if (uuid_random == NULL)...
2015 Jun 26
0
[PATCH v3.1 9/9] New API: set_uuid_random
...test-btrfs-misc.pl | 11 +++++++++++
4 files changed, 59 insertions(+), 1 deletion(-)
diff --git a/daemon/uuids.c b/daemon/uuids.c
index 5238f3e..4530491 100644
--- a/daemon/uuids.c
+++ b/daemon/uuids.c
@@ -85,3 +85,34 @@ 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_blkid_tag (device, "TYPE");
+ if (vfs_type == NULL)
+ return -1;
+
+ if (fstype_is_extfs (vfs_type))
+ r = set_e2uuid_random (device);
+
+ else if...
2015 Jun 30
0
[PATCH v4 7/7] New API: set_uuid_random
...-btrfs-misc.pl | 15 +++++++++++++++
4 files changed, 63 insertions(+), 1 deletion(-)
diff --git a/daemon/uuids.c b/daemon/uuids.c
index 5238f3e..cd5787f 100644
--- a/daemon/uuids.c
+++ b/daemon/uuids.c
@@ -85,3 +85,34 @@ 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_blkid_tag (device, "TYPE");
+ if (vfs_type == NULL)
+ return -1;
+
+ if (fstype_is_extfs (vfs_type))
+ r = set_e2uuid_random (device);
+
+ else if...
2015 Jul 01
0
[PATCH v5 3/3] New API: set_uuid_random
...2uuid(device, "random");
+}
+
char *
do_get_e2uuid (const char *device)
{
diff --git a/daemon/uuids.c b/daemon/uuids.c
index 5238f3e..002f595 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_blkid_tag (device, "TYPE");
+ if (vfs_type == NULL)
+ return -1;
+
+ CLEANUP_FREE char *uuid_random = get_random_uuid ();
+ if (uuid_random == NULL)...
2015 Jun 30
13
[PATCH v4 0/7] uuid: add btrfs uuid change support and set_uuid_random
- Btrfs-progs v4.1 introduced new feature of changing
uuid of btrfs partition.
This patch add support of this.
- Introduce set_uuid_random
- uuids.c did a lot of deplicated work for changing uuid
of fs. Use existing functions.
v4: introduce get_random_uuid
improve testcases
squash internal API patches
v3.1: fix typos
v3: set errno if feature is not available.
Chen Hanxiao (7):
2015 Jul 01
5
[PATCH v5 0/3] uuid: add btrfs uuid change support and set_uuid_random
- Btrfs-progs v4.1 introduced new feature of changing
uuid of btrfs partition.
This patch add support of this.
- Introduce set_uuid_random
- uuids.c did a lot of deplicated work for changing uuid
of fs. Use existing functions.
v5: use NOT_SUPPORTED macro
improve testcases
v4: introduce get_random_uuid
improve testcases
squash internal API patches
v3.1: fix typos
v3: set errno
2015 Jul 17
1
[PATCH] daemon: add a space after func/macro to fit code-style
...uid (device, uuid);
else
- NOT_SUPPORTED(-1, "don't know how to set the UUID for '%s' filesystems",
+ NOT_SUPPORTED (-1, "don't know how to set the UUID for '%s' filesystems",
vfs_type);
return r;
@@ -111,7 +111,7 @@ do_set_uuid_random (const char *device)
r = btrfs_set_uuid_random (device);
else
- NOT_SUPPORTED(-1, "don't know how to set the random UUID for '%s' filesystems",
+ NOT_SUPPORTED (-1, "don't know how to set the random UUID for '%s' filesystems",...
2015 Jun 26
14
[PATCH v3.1 0/9] uuid: add btrfs uuid change support and set_uuid_random
- Btrfs-progs v4.1 introduced new feature of changing
uuid of btrfs partition.
This patch add support of this.
- Introduce set_uuid_random
- uuids.c did a lot of deplicated work for changing uuid
of fs. Use existing functions.
v3.1: fix typos
v3: set errno if feature is not available.
Chen Hanxiao (9):
uuid: add support to change uuid of btrfs partition
uuid: use existing function of
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...n/uuids.c
+++ b/daemon/uuids.c
@@ -79,7 +79,7 @@ do_set_uuid (const char *device, const char *uuid)
else
NOT_SUPPORTED (-1, "don't know how to set the UUID for '%s' filesystems",
- vfs_type);
+ vfs_type);
return r;
}
@@ -112,6 +112,6 @@ do_set_uuid_random (const char *device)
else
NOT_SUPPORTED (-1, "don't know how to set the random UUID for '%s' filesystems",
- vfs_type);
+ vfs_type);
return r;
}
diff --git a/daemon/xattr.c b/daemon/xattr.c
index 8aa28d1..c05124d 100644
--- a/daemon/xattr...
2015 Oct 05
3
[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste.
---
align/scan.c | 35 ++++++++++---------
cat/cat.c | 39 +++++++++++----------
cat/filesystems.c | 69 +++++++++++++++++++-------------------
cat/log.c | 35 ++++++++++---------
cat/ls.c | 61 +++++++++++++++++----------------
df/main.c | 43 ++++++++++++------------
diff/diff.c | 67