Displaying 20 results from an estimated 28 matches for "btrfs_get_label".
2015 Jan 14
2
[PATCH] daemon: use btrfs(1) to get btrfs labels
...r_blkid, blkid);
@@ -76,6 +77,11 @@ do_vfs_type (const mountable_t *mountable)
char *
do_vfs_label (const mountable_t *mountable)
{
+ CLEANUP_FREE char *type = do_vfs_type (mountable);
+
+ if (type && STREQ (type, "btrfs") && optgroup_btrfs_available ())
+ return btrfs_get_label (mountable->device);
+
return get_blkid_tag (mountable->device, "LABEL");
}
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 150c089..cf1507d 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -44,6 +44,30 @@ optgroup_btrfs_available (void)
return prog_exists (str_btrfs)...
2015 Jan 15
1
[PATCH 2/2] daemon: use ntfslabel(1) to get ntfs labels
...rtions(+)
diff --git a/daemon/blkid.c b/daemon/blkid.c
index e8e7b58..1ac42b4 100644
--- a/daemon/blkid.c
+++ b/daemon/blkid.c
@@ -82,6 +82,8 @@ do_vfs_label (const mountable_t *mountable)
if (type) {
if (STREQ (type, "btrfs") && optgroup_btrfs_available ())
return btrfs_get_label (mountable->device);
+ if (STREQ (type, "ntfs") && optgroup_ntfsprogs_available ())
+ return ntfs_get_label (mountable->device);
}
return get_blkid_tag (mountable->device, "LABEL");
diff --git a/daemon/daemon.h b/daemon/daemon.h
index 4ee1a40..94...
2015 Jan 15
0
[PATCH 1/2] daemon: use btrfs(1) to get btrfs labels
...lkid, blkid);
@@ -76,6 +77,13 @@ do_vfs_type (const mountable_t *mountable)
char *
do_vfs_label (const mountable_t *mountable)
{
+ CLEANUP_FREE char *type = do_vfs_type (mountable);
+
+ if (type) {
+ if (STREQ (type, "btrfs") && optgroup_btrfs_available ())
+ return btrfs_get_label (mountable->device);
+ }
+
return get_blkid_tag (mountable->device, "LABEL");
}
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 150c089..cf1507d 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -44,6 +44,30 @@ optgroup_btrfs_available (void)
return prog_exists (str_b...
2015 Jul 08
0
[PATCH 1/5] labels: move btrfslabel to btrfs.c
...;
---
daemon/btrfs.c | 16 ++++++++++++++++
daemon/daemon.h | 1 +
daemon/labels.c | 19 +------------------
3 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 8fcfd81..ee3464d 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -70,6 +70,22 @@ btrfs_get_label (const char *device)
return out;
}
+int
+btrfs_set_label (const char *device, const char *label)
+{
+ int r;
+ CLEANUP_FREE char *err = NULL;
+
+ r = command (NULL, &err, str_btrfs, "filesystem", "label",
+ device, label, NULL);
+ if (r == -1) {
+...
2015 Oct 27
1
[PATCHv3] Added btrfs support to vfs_minimum_size.
...ULL) != LONGINT_OK) {
+ reply_with_error ("cannot parse minimum size");
+ return -1;
+ }
+
+#undef XSTRTOD64
+
+ return ret;
+}
diff --git a/daemon/daemon.h b/daemon/daemon.h
index 8bcc9bd..4a969dd 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -280,6 +280,7 @@ extern char *btrfs_get_label (const char *device);
extern int btrfs_set_label (const char *device, const char *label);
extern int btrfs_set_uuid (const char *device, const char *uuid);
extern int btrfs_set_uuid_random (const char *device);
+extern int64_t btrfs_minimum_size (const char *path);
/*-- in ntfs.c --*/
extern...
2015 Oct 22
2
[PATCH] Added btrfs support for vfs_min_size.
...L) != LONGINT_OK) {
+ reply_with_error ("cannot parse minimum size");
+ return -1;
+ }
+
+#undef XSTRTOD64
+
+ return ret;
+}
+
diff --git a/daemon/daemon.h b/daemon/daemon.h
index 8bcc9bd..4a969dd 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -280,6 +280,7 @@ extern char *btrfs_get_label (const char *device);
extern int btrfs_set_label (const char *device, const char *label);
extern int btrfs_set_uuid (const char *device, const char *uuid);
extern int btrfs_set_uuid_random (const char *device);
+extern int64_t btrfs_minimum_size (const char *path);
/*-- in ntfs.c --*/
extern...
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 02
1
[PATCH v6] New API: set_uuid_random
...xtern int xfs_set_uuid_random (const char *device);
/*-- debug-bmap.c --*/
extern char *debug_bmap (const char *subcmd, size_t argc, char *const *const argv);
@@ -274,6 +276,7 @@ extern char *debug_bmap_device (const char *subcmd, size_t argc, char *const *co
/*-- in btrfs.c --*/
extern char *btrfs_get_label (const char *device);
extern int btrfs_set_uuid (const char *device, const char *uuid);
+extern int btrfs_set_uuid_random (const char *device);
/*-- in ntfs.c --*/
extern char *ntfs_get_label (const char *device);
diff --git a/daemon/ext2.c b/daemon/ext2.c
index 8ef6d5f..93b530b 100644
--- a/d...
2015 Jun 24
2
Re: [PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...> diff --git a/daemon/daemon.h b/daemon/daemon.h
> index 136e9a9..ee0c96f 100644
> --- a/daemon/daemon.h
> +++ b/daemon/daemon.h
> @@ -268,6 +268,7 @@ extern char *debug_bmap_device (const char *subcmd, size_t argc, char *const *co
>
> /*-- in btrfs.c --*/
> extern char *btrfs_get_label (const char *device);
> +extern int btrfstune_set_uuid (const char *device, const char *uuid);
>
> /*-- in ntfs.c --*/
> extern char *ntfs_get_label (const char *device);
> diff --git a/daemon/uuids.c b/daemon/uuids.c
> index 06b33e9..f7791ab 100644
> --- a/daemon/uuids.c
&...
2015 Jun 30
0
[PATCH v4 6/7] daemon: add functions for setting random uuid of fs
...ern int xfs_set_uuid_random (const char *device);
/*-- debug-bmap.c --*/
extern char *debug_bmap (const char *subcmd, size_t argc, char *const *const argv);
@@ -274,12 +276,14 @@ extern char *debug_bmap_device (const char *subcmd, size_t argc, char *const *co
/*-- in btrfs.c --*/
extern char *btrfs_get_label (const char *device);
extern int btrfs_set_uuid (const char *device, const char *uuid);
+extern int btrfs_set_uuid_random (const char *device);
/*-- in ntfs.c --*/
extern char *ntfs_get_label (const char *device);
/*-- in swap.c --*/
extern int swap_set_uuid (const char *device, const char...
2015 Jun 24
0
[PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...device, int64_t superblock, int repair)
diff --git a/daemon/daemon.h b/daemon/daemon.h
index 136e9a9..ee0c96f 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -268,6 +268,7 @@ extern char *debug_bmap_device (const char *subcmd, size_t argc, char *const *co
/*-- in btrfs.c --*/
extern char *btrfs_get_label (const char *device);
+extern int btrfstune_set_uuid (const char *device, const char *uuid);
/*-- in ntfs.c --*/
extern char *ntfs_get_label (const char *device);
diff --git a/daemon/uuids.c b/daemon/uuids.c
index 06b33e9..f7791ab 100644
--- a/daemon/uuids.c
+++ b/daemon/uuids.c
@@ -91,6 +91,12...
2015 Jul 08
9
[PATCH 0/5] labels: rework
We should use the existing function from specific fs,
if not, move it to specific fs files.
Chen Hanxiao (5):
label: move btrfslabel to btrfs.c
label: move e2label to ext2.c and call it locally
label: move ntfslabel to ntfs.c
label: use existing do_xfs_admin for xfslabel
labels: return ENOTSUP if could not set label for specific fs
daemon/btrfs.c | 16 +++++++++++
daemon/daemon.h |
2015 Jun 26
0
[PATCH v3 1/4] uuid: add support to change uuid of btrfs partition
...device, int64_t superblock, int repair)
diff --git a/daemon/daemon.h b/daemon/daemon.h
index 136e9a9..b74ba3c 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -268,6 +268,7 @@ extern char *debug_bmap_device (const char *subcmd, size_t argc, char *const *co
/*-- in btrfs.c --*/
extern char *btrfs_get_label (const char *device);
+extern int btrfs_set_uuid (const char *device, const char *uuid);
/*-- in ntfs.c --*/
extern char *ntfs_get_label (const char *device);
diff --git a/daemon/uuids.c b/daemon/uuids.c
index 06b33e9..f98d8e5 100644
--- a/daemon/uuids.c
+++ b/daemon/uuids.c
@@ -110,10 +110,8 @...
2015 Jun 26
0
[PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition
...device, int64_t superblock, int repair)
diff --git a/daemon/daemon.h b/daemon/daemon.h
index 136e9a9..b74ba3c 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -268,6 +268,7 @@ extern char *debug_bmap_device (const char *subcmd, size_t argc, char *const *co
/*-- in btrfs.c --*/
extern char *btrfs_get_label (const char *device);
+extern int btrfs_set_uuid (const char *device, const char *uuid);
/*-- in ntfs.c --*/
extern char *ntfs_get_label (const char *device);
diff --git a/daemon/uuids.c b/daemon/uuids.c
index 06b33e9..f98d8e5 100644
--- a/daemon/uuids.c
+++ b/daemon/uuids.c
@@ -110,10 +110,8 @...
2015 Jun 30
0
[PATCH v4 1/7] uuid: add support to change uuid of btrfs partition
...device, int64_t superblock, int repair)
diff --git a/daemon/daemon.h b/daemon/daemon.h
index e977095..dd7798c 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -270,6 +270,7 @@ extern char *debug_bmap_device (const char *subcmd, size_t argc, char *const *co
/*-- in btrfs.c --*/
extern char *btrfs_get_label (const char *device);
+extern int btrfs_set_uuid (const char *device, const char *uuid);
/*-- in ntfs.c --*/
extern char *ntfs_get_label (const char *device);
diff --git a/daemon/uuids.c b/daemon/uuids.c
index 06b33e9..f98d8e5 100644
--- a/daemon/uuids.c
+++ b/daemon/uuids.c
@@ -110,10 +110,8 @...
2015 Oct 23
0
Re: [PATCH] Added btrfs support for vfs_min_size.
...imum size");
> + return -1;
> + }
> +
> +#undef XSTRTOD64
> +
> + return ret;
> +}
> +
> diff --git a/daemon/daemon.h b/daemon/daemon.h
> index 8bcc9bd..4a969dd 100644
> --- a/daemon/daemon.h
> +++ b/daemon/daemon.h
> @@ -280,6 +280,7 @@ extern char *btrfs_get_label (const char *device);
> extern int btrfs_set_label (const char *device, const char *label);
> extern int btrfs_set_uuid (const char *device, const char *uuid);
> extern int btrfs_set_uuid_random (const char *device);
> +extern int64_t btrfs_minimum_size (const char *path);
>
>...
2015 Oct 23
1
[PATCHv2] Added btrfs support for vfs_min_size.
...L) != LONGINT_OK) {
+ reply_with_error ("cannot parse minimum size");
+ return -1;
+ }
+
+#undef XSTRTOD64
+
+ return ret;
+}
+
diff --git a/daemon/daemon.h b/daemon/daemon.h
index 8bcc9bd..4a969dd 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -280,6 +280,7 @@ extern char *btrfs_get_label (const char *device);
extern int btrfs_set_label (const char *device, const char *label);
extern int btrfs_set_uuid (const char *device, const char *uuid);
extern int btrfs_set_uuid_random (const char *device);
+extern int64_t btrfs_minimum_size (const char *path);
/*-- in ntfs.c --*/
extern...
2015 Jul 01
0
[PATCH v5 3/3] New API: set_uuid_random
...ern int xfs_set_uuid_random (const char *device);
/*-- debug-bmap.c --*/
extern char *debug_bmap (const char *subcmd, size_t argc, char *const *const argv);
@@ -274,12 +276,14 @@ extern char *debug_bmap_device (const char *subcmd, size_t argc, char *const *co
/*-- in btrfs.c --*/
extern char *btrfs_get_label (const char *device);
extern int btrfs_set_uuid (const char *device, const char *uuid);
+extern int btrfs_set_uuid_random (const char *device);
/*-- in ntfs.c --*/
extern char *ntfs_get_label (const char *device);
/*-- in swap.c --*/
extern int swap_set_uuid (const char *device, const char...
2015 Jun 25
0
Re: [PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...emon/daemon.h
> > index 136e9a9..ee0c96f 100644
> > --- a/daemon/daemon.h
> > +++ b/daemon/daemon.h
> > @@ -268,6 +268,7 @@ extern char *debug_bmap_device (const char *subcmd, size_t
> argc, char *const *co
> >
> > /*-- in btrfs.c --*/
> > extern char *btrfs_get_label (const char *device);
> > +extern int btrfstune_set_uuid (const char *device, const char *uuid);
> >
> > /*-- in ntfs.c --*/
> > extern char *ntfs_get_label (const char *device);
> > diff --git a/daemon/uuids.c b/daemon/uuids.c
> > index 06b33e9..f7791ab 100644...
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):