Displaying 13 results from an estimated 13 matches for "btrfs_set_label".
Did you mean:
btrfs_get_label
2015 Jul 08
0
[PATCH 1/5] labels: move btrfslabel to btrfs.c
...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) {
+ reply_with_error ("%s", err);
+ return -1;
+ }
+...
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 Oct 27
1
[PATCHv3] Added btrfs support to vfs_minimum_size.
...;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 char *ntfs_get_label (const char *device);
diff --...
2015 Oct 22
2
[PATCH] Added btrfs support for vfs_min_size.
...annot 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 char *ntfs_get_label (const char *device);
diff --...
2015 Oct 23
0
Re: [PATCH] Added btrfs support for vfs_min_size.
...> +#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 char *ntfs_get_label...
2015 Oct 23
1
[PATCHv2] Added btrfs support for vfs_min_size.
...annot 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 char *ntfs_get_label (const char *device);
diff --...
2016 Mar 07
0
Re: [PATCH v2] Use less stack.
...e set arbitrarily large (see checks in
> is_systemroot).
>
> This commit changes those to large heap allocations instead.
The general idea and changes of this patch is good, although there are
few places to fix.
> --- a/daemon/btrfs.c
> +++ b/daemon/btrfs.c
> @@ -94,6 +94,11 @@ btrfs_set_label (const char *device, const char *label)
> return 0;
> }
>
> +#if defined(__GNUC__) && GUESTFS_GCC_VERSION >= 40800 /* gcc >= 4.8.0 */
> +#pragma GCC diagnostic push
> +#pragma GCC diagnostic ignored "-Wstack-usage=10000"
> +#endif
> +
> /* T...
2016 Mar 07
2
[PATCH v2] Use less stack.
...; 0) {
+ while ((r = fread (buffer, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {
if (send_file_write (buffer, r) < 0) {
pclose (fp);
return -1;
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 3155a74..e027fb9 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -94,6 +94,11 @@ btrfs_set_label (const char *device, const char *label)
return 0;
}
+#if defined(__GNUC__) && GUESTFS_GCC_VERSION >= 40800 /* gcc >= 4.8.0 */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstack-usage=10000"
+#endif
+
/* Takes optional arguments, consult optargs_bitm...
2016 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames.
Rich.
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option
‘./guestfsd --print-external-commands’
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...- r = command (&out, &err, str_btrfs, "filesystem", "label",
+ r = command (&out, &err, "btrfs", "filesystem", "label",
device, NULL);
if (r == -1) {
reply_with_error ("%s", err);
@@ -84,7 +77,7 @@ btrfs_set_label (const char *device, const char *label)
int r;
CLEANUP_FREE char *err = NULL;
- r = command (NULL, &err, str_btrfs, "filesystem", "label",
+ r = command (NULL, &err, "btrfs", "filesystem", "label",
device, label, NU...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...- r = command (&out, &err, str_btrfs, "filesystem", "label",
+ r = command (&out, &err, "btrfs", "filesystem", "label",
device, NULL);
if (r == -1) {
reply_with_error ("%s", err);
@@ -84,7 +80,7 @@ btrfs_set_label (const char *device, const char *label)
int r;
CLEANUP_FREE char *err = NULL;
- r = command (NULL, &err, str_btrfs, "filesystem", "label",
+ r = command (NULL, &err, "btrfs", "filesystem", "label",
device, label, NU...
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.