Displaying 5 results from an estimated 5 matches for "_with_mounted".
Did you mean:
with_mounted
2017 Jul 21
0
[PATCH v2 15/23] daemon: Reimplement ‘btrfs_subvolume_list’ and ‘btrfs_subvolume_get_default’ in OCaml.
...* a path was supplied by the caller. The path (the m_device
+ * field) is relative to the sysroot.
+ *)
+ f (Sysroot.sysroot_path mountable.m_device)
+
+ | MountableDevice ->
+ let cmd tmpdir =
+ ignore (command "mount" [mountable.m_device; tmpdir]) in
+ _with_mounted cmd f
+
+ | MountableBtrfsVol subvol ->
+ let cmd tmpdir =
+ ignore (command "mount" ["-o"; "subvol=" ^ subvol (* XXX quoting? *);
+ mountable.m_device; tmpdir]) in
+ _with_mounted cmd f
+
+and _with_mounted mount_cmd f...
2017 Aug 01
0
[PATCH v2 3/3] daemon: Restore PCRE regular expressions in OCaml code.
...LAGS = \
+ mlpcre.$(MLARCHIVE) \
mlcutils.$(MLARCHIVE) \
mlstdutils.$(MLARCHIVE) \
$(LINK_CUSTOM_OCAMLC_ONLY)
diff --git a/daemon/btrfs.ml b/daemon/btrfs.ml
index fc02abefa..c51689744 100644
--- a/daemon/btrfs.ml
+++ b/daemon/btrfs.ml
@@ -71,9 +71,9 @@ let rec with_mounted mountable f =
_with_mounted cmd f
let re_btrfs_subvolume_list =
- Str.regexp ("ID[ \t]+\\([0-9]+\\).*[ \t]" ^
- "top level[ \t]+\\([0-9]+\\).*[ \t]" ^
- "path[ \t]+\\(.*\\)")
+ PCRE.compile ("ID\\s+(\\d+).*\\s" ^
+ "top level\\s+(\\d+)....
2017 Jul 21
27
[PATCH v2 00/23] Reimplement many daemon APIs in OCaml.
v1 was posted here:
https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html
This series now depends on two small patches which I posted separately:
https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html
https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html
v1 -> v2:
- Previously changes to generator/daemon.ml were made incrementally
through the patch
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.
2017 Aug 01
6
[PATCH v2 0/3] common: Add a lightweight OCaml binding for PCRE.
v2:
- Change the OCaml code in the daemon to use PCRE instead of Str.
- Call pcre_compile2 so we can capture the error code on failure.
- Extend the test suite.
- Some other cleanups, but very minor.
Rich.