search for: do_btrfs_subvolume_get_default

Displaying 20 results from an estimated 26 matches for "do_btrfs_subvolume_get_default".

2014 Nov 21
2
Re: [PATCH 5/6] New API: btrfs_subvolume_get_default
...anged, 48 insertions(+), 1 deletion(-) > > diff --git a/daemon/btrfs.c b/daemon/btrfs.c > index 0f525fa..e179b57 100644 > --- a/daemon/btrfs.c > +++ b/daemon/btrfs.c > @@ -549,6 +549,44 @@ do_btrfs_subvolume_set_default (int64_t id, const char *fs) > } > > int > +do_btrfs_subvolume_get_default (const char *fs) > +{ > + const size_t MAX_ARGS = 64; > + const char *argv[MAX_ARGS]; > + size_t i = 0; > + CLEANUP_FREE char *fs_buf = NULL; > + CLEANUP_FREE char *err = NULL; > + CLEANUP_FREE char *out = NULL; > + int r; > + > + fs_buf = sysroot_path (fs); &g...
2014 Nov 21
0
[PATCH 5/6] New API: btrfs_subvolume_get_default
...+++++++++ src/MAX_PROC_NR | 2 +- 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 0f525fa..e179b57 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -549,6 +549,44 @@ do_btrfs_subvolume_set_default (int64_t id, const char *fs) } int +do_btrfs_subvolume_get_default (const char *fs) +{ + const size_t MAX_ARGS = 64; + const char *argv[MAX_ARGS]; + size_t i = 0; + CLEANUP_FREE char *fs_buf = NULL; + CLEANUP_FREE char *err = NULL; + CLEANUP_FREE char *out = NULL; + int r; + + fs_buf = sysroot_path (fs); + if (fs_buf == NULL) { + reply_with_perror (&qu...
2014 Nov 24
0
Re: [PATCH 5/6] New API: btrfs_subvolume_get_default
...> diff --git a/daemon/btrfs.c b/daemon/btrfs.c > > index 0f525fa..e179b57 100644 > > --- a/daemon/btrfs.c > > +++ b/daemon/btrfs.c > > @@ -549,6 +549,44 @@ do_btrfs_subvolume_set_default (int64_t id, const > char *fs) > > } > > > > int > > +do_btrfs_subvolume_get_default (const char *fs) > > +{ > > + const size_t MAX_ARGS = 64; > > + const char *argv[MAX_ARGS]; > > + size_t i = 0; > > + CLEANUP_FREE char *fs_buf = NULL; > > + CLEANUP_FREE char *err = NULL; > > + CLEANUP_FREE char *out = NULL; > > + int r; >...
2014 Dec 02
0
[PATCH 1/8] New API: btrfs_subvolume_get_default
...X_PROC_NR | 2 +- 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 754fdcd..471cfbd 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -545,6 +545,44 @@ do_btrfs_subvolume_set_default (int64_t id, const char *fs) return 0; } +int64_t +do_btrfs_subvolume_get_default (const char *mountpoint) +{ + const size_t MAX_ARGS = 64; + const char *argv[MAX_ARGS]; + size_t i = 0; + CLEANUP_FREE char *fs_buf = NULL; + CLEANUP_FREE char *err = NULL; + CLEANUP_FREE char *out = NULL; + int r; + int64_t ret; + + fs_buf = sysroot_path (mountpoint); + if (fs_buf == NUL...
2014 Dec 11
0
[PATCH v2 02/11] New API: btrfs_subvolume_get_default
...X_PROC_NR | 2 +- 3 files changed, 58 insertions(+), 1 deletion(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 2e9859d..9f4c5f4 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -553,6 +553,45 @@ do_btrfs_subvolume_set_default (int64_t id, const char *fs) return 0; } +int64_t +do_btrfs_subvolume_get_default (const mountable_t *fs) +{ + const size_t MAX_ARGS = 64; + const char *argv[MAX_ARGS]; + size_t i = 0; + char *fs_buf = NULL; + CLEANUP_FREE char *err = NULL; + CLEANUP_FREE char *out = NULL; + int r; + int64_t ret = -1; + + fs_buf = mount (fs); + if (fs_buf == NULL) + goto error; + +...
2017 Jul 21
0
[PATCH v2 15/23] daemon: Reimplement ‘btrfs_subvolume_list’ and ‘btrfs_subvolume_get_default’ in OCaml.
...btrfssubvolume_path); - free (ret->guestfs_int_btrfssubvolume_list_val); - } - free (ret); - - return NULL; -} - int do_btrfs_subvolume_set_default (int64_t id, const char *fs) { @@ -649,45 +513,6 @@ do_btrfs_subvolume_set_default (int64_t id, const char *fs) return 0; } -int64_t -do_btrfs_subvolume_get_default (const mountable_t *fs) -{ - const size_t MAX_ARGS = 64; - const char *argv[MAX_ARGS]; - size_t i = 0; - char *fs_buf = NULL; - CLEANUP_FREE char *err = NULL; - CLEANUP_FREE char *out = NULL; - int r; - int64_t ret = -1; - - fs_buf = mount (fs); - if (fs_buf == NULL) - goto error; - -...
2017 Jul 14
0
[PATCH 18/27] daemon: Reimplement ‘btrfs_subvolume_list’ and ‘btrfs_subvolume_get_default’ in OCaml.
...btrfssubvolume_path); - free (ret->guestfs_int_btrfssubvolume_list_val); - } - free (ret); - - return NULL; -} - int do_btrfs_subvolume_set_default (int64_t id, const char *fs) { @@ -649,45 +513,6 @@ do_btrfs_subvolume_set_default (int64_t id, const char *fs) return 0; } -int64_t -do_btrfs_subvolume_get_default (const mountable_t *fs) -{ - const size_t MAX_ARGS = 64; - const char *argv[MAX_ARGS]; - size_t i = 0; - char *fs_buf = NULL; - CLEANUP_FREE char *err = NULL; - CLEANUP_FREE char *out = NULL; - int r; - int64_t ret = -1; - - fs_buf = mount (fs); - if (fs_buf == NULL) - goto error; - -...
2014 Nov 21
13
[PATCH 0/6] btrfs support part1: subvolume commands
Hi, This is the part1 of improving btrfs support. This series adds missing parameters to btrfs_subvolume_snapshot and btrfs_subvolume_create, and adds two new API btrfs_subvolume_get_default and btrfs_subvolume_show. Other parts will follow. Regards, Hu Hu Tao (6): btrfs: correct words about subvolume and snapshot btrfs: add optional parameter `ro' to btrfs_subvolume_snapshot btrfs:
2014 Dec 11
14
[PATCH v2 00/11] btrfs support part2: qgroup/quota commands
Hi, This is v2 series to add support to btrfs qgroup related commands, inclduing quota commands, and two leftover of subvolume commands. Regards, Hu changes: v2: - add tests for new APIs - combine btrfs_quota_enable and btrfs_quota_disable - following APIs changed to operate on Mountable_or_Path: btrfs_subvolume_get_default, btrfs_quota_enable, btrfs_quota_rescan. Hu Tao (11):
2014 Nov 26
7
[PATCH v2 0/5] btrfs support part1: subvolume commands
Hi, This is the part1 of improving btrfs support. This series adds missing parameters to btrfs_subvolume_snapshot and btrfs_subvolume_create, and adds two new API btrfs_subvolume_get_default and btrfs_subvolume_show. Other parts will follow. Regards, Hu changes: v2: - add 'once_had_no_optargs = true' for btrfs_subvolume_snapshot and btrfs_subvolume_create - improved documents
2014 Dec 12
15
[PATCH v3 00/11] btrfs support part2: qgroup/quota commands
Hi, This is v3 series to add support to btrfs qgroup related commands, inclduing quota commands, and two leftover of subvolume commands. Regards, Hu changes: v3: - don't intialize fs_buf (patch 1) - check the return value of sysroot_path (patch 1) - check fs_buf rather than fs (patch 1) - fprintf (stderr,...) -> reply_with_error() v2: - add tests for new APIs - combine
2014 Dec 02
21
[PATCH 0/8] btrfs support part2: qgroup commands
Hi, This series adds support to btrfs qgroup related commands, inclduing quota commands, and two leftover of subvolume commands. Regards, Hu Hu Tao (8): New API: btrfs_subvolume_get_default New API: btrfs_subvolume_show New API: btrfs_quota_enable New API: btrfs_quota_disable New API: btrfs_quota_rescan New API: btrfs_qgroup_limit New API: btrfs_qgroup_create New API:
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...@@ do_btrfs_subvolume_set_default (int64_t id, const char *fs) return -1; } - ADD_ARG (argv, i, str_btrfs); + ADD_ARG (argv, i, "btrfs"); ADD_ARG (argv, i, "subvolume"); ADD_ARG (argv, i, "set-default"); ADD_ARG (argv, i, buf); @@ -622,7 +615,7 @@ do_btrfs_subvolume_get_default (const mountable_t *fs) if (fs_buf == NULL) goto error; - ADD_ARG (argv, i, str_btrfs); + ADD_ARG (argv, i, "btrfs"); ADD_ARG (argv, i, "subvolume"); ADD_ARG (argv, i, "get-default"); ADD_ARG (argv, i, fs_buf); @@ -661,7 +654,7 @@ do_btrfs_filesyst...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...@@ do_btrfs_subvolume_set_default (int64_t id, const char *fs) return -1; } - ADD_ARG (argv, i, str_btrfs); + ADD_ARG (argv, i, "btrfs"); ADD_ARG (argv, i, "subvolume"); ADD_ARG (argv, i, "set-default"); ADD_ARG (argv, i, buf); @@ -622,7 +618,7 @@ do_btrfs_subvolume_get_default (const mountable_t *fs) if (fs_buf == NULL) goto error; - ADD_ARG (argv, i, str_btrfs); + ADD_ARG (argv, i, "btrfs"); ADD_ARG (argv, i, "subvolume"); ADD_ARG (argv, i, "get-default"); ADD_ARG (argv, i, fs_buf); @@ -661,7 +657,7 @@ do_btrfs_filesyst...
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...557,7 +557,7 @@ do_btrfs_subvolume_list (const mountable_t *fs) return ret; -error: + error: if (ret->guestfs_int_btrfssubvolume_list_val) { for (i = 0; i < nr_subvolumes; ++i) free (ret->guestfs_int_btrfssubvolume_list_val[i].btrfssubvolume_path); @@ -639,7 +639,7 @@ do_btrfs_subvolume_get_default (const mountable_t *fs) goto error; } -error: + error: if (fs_buf && umount (fs_buf, fs) != 0) return -1; return ret; @@ -1096,18 +1096,18 @@ do_btrfs_subvolume_show (const char *subvolume) p = analyze_line (p, &key, &value, ':'); while (...
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
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.
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 Jun 05
19
[PATCH v3 00/19] Allow APIs to be implemented in OCaml.
v2 was here: https://www.redhat.com/archives/libguestfs/2017-June/msg00008.html This series gets as far as a working (and faster) reimplementation of ‘guestfs_list_filesystems’. I also have another patch series on top of this one which reimplements the inspection APIs inside the daemon, but that needs a bit more work still, since inspection turns out to be a very large piece of code. Rich.
2017 Jul 27
23
[PATCH v3 00/23] Reimplement many daemon APIs in OCaml.
I think this fixes everything mentioned: - Added the Optgroups module as suggested. - Remove command temporary files. - Replace command ~flags with ?fold_stdout_on_stderr. - Nest _with_mounted function. - Rebase & retest. Rich.