Displaying 20 results from an estimated 27 matches for "mountable_path".
2014 Dec 11
1
Re: [PATCH v2 01/11] daemon: btrfs: add helper functions mount and umount
...m 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 initialized
almost always). You have correctly removed CLEANUP_FREE, but not the
initialization of NULL.
> + if (fs->type == MOUNTABLE_PATH) {
> + return sysroot_path (fs->device);
There's a whole chunk of code missing in here, starting with:
> - if (fs_buf == NULL) {
> - reply_with_perror ("malloc");
> -
> - cmderror:
It seems like it is still necessary to me.
> + } else {
&g...
2014 Dec 12
0
[PATCH v3 01/11] daemon: btrfs: add helper functions mount and umount
.../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_perror ("strdup");
+ return NULL;
+ }
+
+ if (mk...
2014 Dec 11
0
[PATCH v2 01/11] daemon: btrfs: add helper functions mount and umount
.../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 (mkdtemp (fs_buf) == NULL) {
+ fprintf (stderr, "mkdtemp: %s\n"...
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 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
2013 Feb 12
7
Remaining btrfs patches
[PATCH 1/7] mount: Add mount_vfs_nochroot
This is significantly reworked from before. umount is gone as
discussed, and variable motion is minimised.
[PATCH 2/7] btrfs: Update btrfs_subvolume_list to take
Already provisionally ACKed. Previous comment was that cleanup could
be tidier. I looked into creating a new cleanup function for fs_buf,
but it isn't possible (or simple, anyway) in this
2017 Apr 20
6
[PATCH 0/5] generator: daemon: Various simplifications to stubs code.
This is a series of simplifications to the stubs code.
It's all refactoring, there is no functional change.
Rich.
2017 Jul 14
0
[PATCH 04/27] daemon: Reimplement ‘vfs_type’ API in OCaml.
...mplement String (Mountable, _) parameter. */
+static value
+copy_mountable (const mountable_t *mountable)
+{
+ CAMLparam0 ();
+ CAMLlocal4 (r, typev, devicev, volumev);
+
+ switch (mountable->type) {
+ case MOUNTABLE_DEVICE:
+ typev = Val_int (0); /* MountableDevice */
+ break;
+ case MOUNTABLE_PATH:
+ typev = Val_int (1); /* MountablePath */
+ break;
+ case MOUNTABLE_BTRFSVOL:
+ volumev = caml_copy_string (mountable->volume);
+ typev = caml_alloc (1, 0); /* MountableBtrfsVol */
+ Store_field (typev, 0, volumev);
+ }
+
+ devicev = caml_copy_string (mountable->device);
+...
2013 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
This type is initially identical to Device.
---
generator/bindtests.ml | 2 +-
generator/c.ml | 7 +++++--
generator/csharp.ml | 6 ++++--
generator/daemon.ml | 4 ++--
generator/erlang.ml | 6 +++---
generator/fish.ml | 8 ++++----
generator/gobject.ml | 11 ++++++-----
generator/haskell.ml | 11 +++++++----
generator/java.ml | 10 +++++-----
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...id)
{
fprintf (stderr,
- "guestfsd [-r] [-v|--verbose]\n");
+ "guestfsd [-r] [-v|--verbose]\n");
}
int
@@ -1394,18 +1394,18 @@ mountable_to_string (const mountable_t *mountable)
char *desc;
switch (mountable->type) {
- case MOUNTABLE_DEVICE:
- case MOUNTABLE_PATH:
- return strdup (mountable->device);
+ case MOUNTABLE_DEVICE:
+ case MOUNTABLE_PATH:
+ return strdup (mountable->device);
- case MOUNTABLE_BTRFSVOL:
- if (asprintf (&desc, "btrfsvol:%s/%s",
- mountable->device, mountable->volume) ==...
2017 Jul 21
0
[PATCH v2 01/23] daemon: Allow parts of the daemon and APIs to be written in OCaml.
...ing (Mountable, _) parameter. */
+value
+guestfs_int_daemon_copy_mountable (const mountable_t *mountable)
+{
+ CAMLparam0 ();
+ CAMLlocal4 (r, typev, devicev, volumev);
+
+ switch (mountable->type) {
+ case MOUNTABLE_DEVICE:
+ typev = Val_int (0); /* MountableDevice */
+ break;
+ case MOUNTABLE_PATH:
+ typev = Val_int (1); /* MountablePath */
+ break;
+ case MOUNTABLE_BTRFSVOL:
+ volumev = caml_copy_string (mountable->volume);
+ typev = caml_alloc (1, 0); /* MountableBtrfsVol */
+ Store_field (typev, 0, volumev);
+ }
+
+ devicev = caml_copy_string (mountable->device);
+...
2017 Aug 03
9
[PATCH 0/6] tests: Fix handling of device API parameters (RHBZ#1477623).
https://bugzilla.redhat.com/show_bug.cgi?id=1477623
The first two patches are cleanups.
The third patch changes the way that we handle Device and Dev_or_Path
parameters so that a parameter marked as such can really only contain
a block device name (and not, for instance, a chardev). Using a
chardev here caused hangs in the API.
The next two patches fix API usage to conform to this new stricter
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
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...est, const char *qgroupid)
return -1;
}
- ADD_ARG (argv, i, str_btrfs);
+ ADD_ARG (argv, i, "btrfs");
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "create");
@@ -426,7 +419,7 @@ umount (char *fs_buf, const mountable_t *fs)
if (fs->type != MOUNTABLE_PATH) {
CLEANUP_FREE char *err = NULL;
- if (command (NULL, &err, str_umount, fs_buf, NULL) == -1) {
+ if (command (NULL, &err, "umount", fs_buf, NULL) == -1) {
reply_with_error ("umount: %s", err);
return -1;
}
@@ -455,7 +448,7 @@ do_btrfs_sub...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...est, const char *qgroupid)
return -1;
}
- ADD_ARG (argv, i, str_btrfs);
+ ADD_ARG (argv, i, "btrfs");
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "create");
@@ -426,7 +422,7 @@ umount (char *fs_buf, const mountable_t *fs)
if (fs->type != MOUNTABLE_PATH) {
CLEANUP_FREE char *err = NULL;
- if (command (NULL, &err, str_umount, fs_buf, NULL) == -1) {
+ if (command (NULL, &err, "umount", fs_buf, NULL) == -1) {
reply_with_error ("umount: %s", err);
return -1;
}
@@ -455,7 +451,7 @@ do_btrfs_sub...
2013 Aug 24
67
[PATCH 00/67] Proposed patches for libguestfs 1.22.6.
In the kernel and qemu communities it is routine for patches that will
be backported to stable branches to be posted for review. I'm
proposing we do the same for libguestfs stable branches.
All of the attached have been tested with 'make check-release'.
Rich.
2017 Jun 03
12
[PATCH v2 00/12] Allow APIs to be implemented in OCaml.
Version 1 was here:
https://www.redhat.com/archives/libguestfs/2017-June/msg00003.html
This patch series reimplements a few more APIs in OCaml, including
some very important core APIs like ?list_filesystems? and ?mount?.
All the tests pass after this.
The selection of APIs that I have moved may look a little random, but
in fact they are all APIs consumed by the inspection code (and some
more
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.