search for: mountable_t

Displaying 20 results from an estimated 185 matches for "mountable_t".

Did you mean: mountable
2015 Jun 17
2
Re: [PATCH v4 2/3] do_btrfs_subvolume_list: fix a bad return value
...daemon/btrfs.c | 26 +++++++++++++++++--------- > 1 file changed, 17 insertions(+), 9 deletions(-) > > diff --git a/daemon/btrfs.c b/daemon/btrfs.c > index 8d03caa..5361984 100644 > --- a/daemon/btrfs.c > +++ b/daemon/btrfs.c > @@ -409,7 +409,7 @@ umount (char *fs_buf, const mountable_t *fs) > guestfs_int_btrfssubvolume_list * > do_btrfs_subvolume_list (const mountable_t *fs) > { > - char **lines; > + CLEANUP_FREE_STRING_LIST char **lines = NULL; > size_t i = 0; > const size_t MAX_ARGS = 64; > const char *argv[MAX_ARGS]; > @@ -472,7 +472,7...
2014 Dec 11
1
Re: [PATCH v2 01/11] daemon: btrfs: add helper functions mount and umount
...gt; diff --git a/daemon/btrfs.c b/daemon/btrfs.c > index 754fdcd..2e9859d 100644 > --- a/daemon/btrfs.c > +++ b/daemon/btrfs.c > @@ -326,6 +326,56 @@ do_btrfs_subvolume_create (const char *dest, const char *qgroupid) > return 0; > } > > +static char > +*mount (const mountable_t *fs) > +{ > + char *fs_buf = NULL; You shouldn't initialize fs_buf to NULL here, since it prevents the compiler from detecting uninitialized use of fs_buf. The reason it was initialized to NULL in the previous code was because it was a CLEANUP_FREE function (and those have to be initia...
2014 Dec 12
0
[PATCH v3 01/11] daemon: btrfs: add helper functions mount and umount
...file changed, 58 insertions(+), 48 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 754fdcd..514ba37 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -326,6 +326,58 @@ do_btrfs_subvolume_create (const char *dest, const char *qgroupid) return 0; } +static char +*mount (const mountable_t *fs) +{ + char *fs_buf; + + if (fs->type == MOUNTABLE_PATH) { + fs_buf = sysroot_path (fs->device); + if (fs_buf == NULL) + reply_with_perror ("malloc"); + } else { + fs_buf = strdup ("/tmp/btrfs.XXXXXX"); + if (fs_buf == NULL) { + reply_with_perro...
2014 Dec 11
0
[PATCH v2 01/11] daemon: btrfs: add helper functions mount and umount
...file changed, 56 insertions(+), 48 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 754fdcd..2e9859d 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -326,6 +326,56 @@ do_btrfs_subvolume_create (const char *dest, const char *qgroupid) return 0; } +static char +*mount (const mountable_t *fs) +{ + char *fs_buf = NULL; + + if (fs->type == MOUNTABLE_PATH) { + return sysroot_path (fs->device); + } else { + fs_buf = strdup ("/tmp/btrfs.XXXXXX"); + if (fs_buf == NULL) { + fprintf (stderr, "strdup\n"); + return NULL; + } + + if (mkdte...
2015 Jun 17
6
[PATCH v4 0/3] btrfs: use CLEANUP_FREE_STRING_LIST for list free
As Pino's comment, we should take advantage of macro CLEANUP_FREE_STRING_LIST v4: remove some redundant strdup v3: fix test case failure v2: properly initialize lines Chen Hanxiao (3): do_btrfs_qgroup_show: fix a bad return value do_btrfs_subvolume_list: fix a bad return value btrfs: use CLEANUP_FREE_STRING_LIST for list free daemon/btrfs.c | 70
2015 Jun 12
1
[PATCH] btrfs: use CLEANUP_FREE_STRING_LIST for list free
...hen Hanxiao <chenhanxiao@cn.fujitsu.com> --- daemon/btrfs.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 39392f7..fd93d43 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -409,7 +409,7 @@ umount (char *fs_buf, const mountable_t *fs) guestfs_int_btrfssubvolume_list * do_btrfs_subvolume_list (const mountable_t *fs) { - char **lines; + CLEANUP_FREE_STRING_LIST char **lines; size_t i = 0; const size_t MAX_ARGS = 64; const char *argv[MAX_ARGS]; @@ -534,13 +534,11 @@ do_btrfs_subvolume_list (const mountable_t *fs)...
2015 Jun 17
0
[PATCH v4 2/3] do_btrfs_subvolume_list: fix a bad return value
...;chenhanxiao@cn.fujitsu.com> --- daemon/btrfs.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 8d03caa..5361984 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -409,7 +409,7 @@ umount (char *fs_buf, const mountable_t *fs) guestfs_int_btrfssubvolume_list * do_btrfs_subvolume_list (const mountable_t *fs) { - char **lines; + CLEANUP_FREE_STRING_LIST char **lines = NULL; size_t i = 0; const size_t MAX_ARGS = 64; const char *argv[MAX_ARGS]; @@ -472,7 +472,7 @@ do_btrfs_subvolume_list (const mountable_t...
2015 Jun 18
0
Re: [PATCH v4 2/3] do_btrfs_subvolume_list: fix a bad return value
...+++++--------- > > 1 file changed, 17 insertions(+), 9 deletions(-) > > > > diff --git a/daemon/btrfs.c b/daemon/btrfs.c > > index 8d03caa..5361984 100644 > > --- a/daemon/btrfs.c > > +++ b/daemon/btrfs.c > > @@ -409,7 +409,7 @@ umount (char *fs_buf, const mountable_t *fs) > > guestfs_int_btrfssubvolume_list * > > do_btrfs_subvolume_list (const mountable_t *fs) > > { > > - char **lines; > > + CLEANUP_FREE_STRING_LIST char **lines = NULL; > > size_t i = 0; > > const size_t MAX_ARGS = 64; > > const char...
2017 Jul 14
0
[PATCH 09/27] daemon: Reimplement ‘mount’, ‘mount_ro’, ‘mount_options’, ‘mount_vfs’ APIs in OCaml.
...); GUESTFSD_EXT_CMD(str_umount, umount); GUESTFSD_EXT_CMD(str_btrfsimage, btrfs-image); @@ -387,6 +388,48 @@ do_btrfs_subvolume_create (const char *dest, const char *qgroupid) return 0; } +static int +mount_vfs_nochroot (const char *options, const char *vfstype, + const mountable_t *mountable, + const char *mp, const char *user_mp) +{ + CLEANUP_FREE char *options_plus = NULL; + const char *device = mountable->device; + if (mountable->type == MOUNTABLE_BTRFSVOL) { + if (options && strlen (options) > 0) { + if (asprintf (&optio...
2016 Feb 23
3
[PATCH 1/2] lib: Allow the COMPILE_REGEXP macro to be used everywhere.
...free_regexp_##name (void) \ + { \ + pcre_free (name); \ + } + /* The type field of a parsed mountable. * * This is used both by mountable_t in the daemon, and diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index 22b6c6c..3707c1b 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -710,30 +710,6 @@ extern int guestfs_int_match6 (guestfs_h *g, const char *str, const pcre *re, ch #define match4 guestfs_int_m...
2016 Aug 08
1
[PATCH] sleuthkit code cleanup
...tteo Cafasso <noxdafox@gmail.com> --- daemon/sleuthkit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon/sleuthkit.c b/daemon/sleuthkit.c index ce738e3..e642731 100644 --- a/daemon/sleuthkit.c +++ b/daemon/sleuthkit.c @@ -47,7 +47,8 @@ do_download_inode (const mountable_t *mountable, int64_t inode) } /* Construct the command. */ - ret = asprintf(&cmd, "%s -r %s %" PRIi64, str_icat, mountable->device, inode); + ret = asprintf (&cmd, "%s -r %s %" PRIi64, + str_icat, mountable->device, inode); if (ret <...
2015 Jun 15
7
[PATCH v3 0/3] btrfs: use CLEANUP_FREE_STRING_LIST for list free
As Pino's comment, we should take advantage of macro CLEANUP_FREE_STRING_LIST v3: fix test case failure v2: properly initialize lines Chen Hanxiao (3): do_btrfs_qgroup_show: fix a bad return value do_btrfs_subvolume_list: fix a bad return value btrfs: use CLEANUP_FREE_STRING_LIST for list free daemon/btrfs.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
2016 Jul 26
1
[PATCH] daemon: lvm: change the separator character to '\r'
...conflicts with texts of metadata. --- generator/daemon.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generator/daemon.ml b/generator/daemon.ml index d8dc9cf..1d79126 100644 --- a/generator/daemon.ml +++ b/generator/daemon.ml @@ -563,7 +563,7 @@ cleanup_free_mountable (mountable_t *mountable) pr " fprintf (stderr, \"%%s: failed: string finished early, around token %%s\\n\", __func__, \"%s\");\n" name; pr " return -1;\n"; pr " }\n"; - pr " p = strchrnul (tok, '...
2015 Jun 18
2
[PATCH v5 1/2] do_btrfs_qgroup_show: fix a bad return value
We should not use temporary lines buffer as return value, for lines buffer will be freed. Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- v5: modify according to Pino's comments v4: take advantage of sscanf's '%m'. v3: fix test case failure daemon/btrfs.c | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git
2015 Jan 14
2
[PATCH] daemon: use btrfs(1) to get btrfs labels
...daemon/blkid.c b/daemon/blkid.c index b98c155..2c9e2f1 100644 --- a/daemon/blkid.c +++ b/daemon/blkid.c @@ -26,6 +26,7 @@ #include "daemon.h" #include "actions.h" +#include "optgroups.h" GUESTFSD_EXT_CMD(str_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 (m...
2015 Jun 18
1
Re: [PATCH v4 2/3] do_btrfs_subvolume_list: fix a bad return value
...le changed, 17 insertions(+), 9 deletions(-) > > > > > > diff --git a/daemon/btrfs.c b/daemon/btrfs.c > > > index 8d03caa..5361984 100644 > > > --- a/daemon/btrfs.c > > > +++ b/daemon/btrfs.c > > > @@ -409,7 +409,7 @@ umount (char *fs_buf, const mountable_t *fs) > > > guestfs_int_btrfssubvolume_list * > > > do_btrfs_subvolume_list (const mountable_t *fs) > > > { > > > - char **lines; > > > + CLEANUP_FREE_STRING_LIST char **lines = NULL; > > > size_t i = 0; > > > const size_t MAX...
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):
2013 Jan 24
3
[REVIEW ONLY] Mountable patches
These 3 patches implement support for APIs which must accept a mountable, but don't update apis which must return mountables. Matt
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 12
1
[PATCH v2] btrfs: use CLEANUP_FREE_STRING_LIST for list free
...lize variable of CLEANUP_FREE_STRING_LIST to null daemon/btrfs.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 39392f7..3ca39ab 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -409,7 +409,7 @@ umount (char *fs_buf, const mountable_t *fs) guestfs_int_btrfssubvolume_list * do_btrfs_subvolume_list (const mountable_t *fs) { - char **lines; + CLEANUP_FREE_STRING_LIST char **lines = NULL; size_t i = 0; const size_t MAX_ARGS = 64; const char *argv[MAX_ARGS]; @@ -534,13 +534,11 @@ do_btrfs_subvolume_list (const mountable...