Displaying 14 results from an estimated 14 matches for "mount_opts_fn".
2016 Mar 03
1
[PATCH] mllib: factor out mounting of guest root
...7 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -833,3 +833,21 @@ let read_first_line_from_file filename =
let is_regular_file path = (* NB: follows symlinks. *)
try (Unix.stat path).Unix.st_kind = Unix.S_REG
with Unix.Unix_error _ -> false
+
+let inspect_mount_root g ?mount_opts_fn root =
+ let mps = g#inspect_get_mountpoints root in
+ let cmp (a,_) (b,_) =
+ compare (String.length a) (String.length b) in
+ let mps = List.sort cmp mps in
+ List.iter (
+ fun (mp, dev) ->
+ let mountfn =
+ match mount_opts_fn with
+ | Some fn -> g#mount_option...
2016 Jul 07
2
Re: [PATCH 1/3] mllib: add checking for btrfs subvolume
...gt; mllib/common_utils.mli | 3 +++
> 2 files changed, 13 insertions(+)
>
> diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
> index 77b9acd..30fc5cd 100644
> --- a/mllib/common_utils.ml
> +++ b/mllib/common_utils.ml
> @@ -922,3 +922,13 @@ let inspect_mount_root g ?mount_opts_fn root =
>
> let inspect_mount_root_ro =
> inspect_mount_root ~mount_opts_fn:(fun _ -> "ro")
> +
> +let is_btrfs_subvolume g fs =
> + let device = g#mountable_device fs in
> + let subvol =
> + try
> + g#mountable_subvolume fs
> + with Gues...
2016 Jul 07
0
[PATCH 1/3] mllib: add checking for btrfs subvolume
...mllib/common_utils.ml | 10 ++++++++++
mllib/common_utils.mli | 3 +++
2 files changed, 13 insertions(+)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 77b9acd..30fc5cd 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -922,3 +922,13 @@ let inspect_mount_root g ?mount_opts_fn root =
let inspect_mount_root_ro =
inspect_mount_root ~mount_opts_fn:(fun _ -> "ro")
+
+let is_btrfs_subvolume g fs =
+ let device = g#mountable_device fs in
+ let subvol =
+ try
+ g#mountable_subvolume fs
+ with Guestfs.Error msg as exn ->
+ if g#last_errno...
2016 Jul 08
0
[PATCHv2 1/3] mllib: add checking for btrfs subvolume
...---
mllib/common_utils.ml | 7 +++++++
mllib/common_utils.mli | 3 +++
2 files changed, 10 insertions(+)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 77b9acd..35f6545 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -922,3 +922,10 @@ let inspect_mount_root g ?mount_opts_fn root =
let inspect_mount_root_ro =
inspect_mount_root ~mount_opts_fn:(fun _ -> "ro")
+
+let is_btrfs_subvolume g fs =
+ try
+ ignore (g#mountable_subvolume fs); true
+ with Guestfs.Error msg as exn ->
+ if g#last_errno () = Guestfs.Errno.errno_EINVAL then false
+ el...
2016 Jul 07
7
[PATCH 0/3] fix btrfs subvolume procession in tools
This patcheset fixes errors in virt-sysprep and virt-sparsify.
Here we have a common functionality: is_btrfs_subvolume.
Doesn't it make sense to turn it into guestfs API?
Also I found an issue. In 'virt-sysprep fs-uuids',
the uuids for ALL filesystems are regenerated
as many times as many roots are in guest.
Is it done intentionally?
Maxim Perevedentsev (3):
mllib: add checking
2016 Jul 08
4
[PATCHv2 0/3] fix btrfs subvolume procession in tools
sparsify case: modified guestfs_is_lv
mllib: fixed is_btrfs_subvolume
Maxim Perevedentsev (3):
mllib: add checking for btrfs subvolume
lvm: modify guestfs_is_lv to take mountable
sysprep: fix btrfs subvolume processing in fs-uuids
daemon/lvm.c | 6 ++++--
generator/actions.ml | 6 +++---
mllib/common_utils.ml | 7 +++++++
2016 Jul 07
0
Re: [PATCH 1/3] mllib: add checking for btrfs subvolume
...+
> > 2 files changed, 13 insertions(+)
> >
> > diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
> > index 77b9acd..30fc5cd 100644
> > --- a/mllib/common_utils.ml
> > +++ b/mllib/common_utils.ml
> > @@ -922,3 +922,13 @@ let inspect_mount_root g ?mount_opts_fn root =
> >
> > let inspect_mount_root_ro =
> > inspect_mount_root ~mount_opts_fn:(fun _ -> "ro")
> > +
> > +let is_btrfs_subvolume g fs =
> > + let device = g#mountable_device fs in
> > + let subvol =
> > + try
> > +...
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
...Annoyingly Sys.is_directory throws an exception on failure
* (RHBZ#1022431).
*)
@@ -995,6 +1095,8 @@ let is_regular_file path = (* NB: follows symlinks. *)
try (Unix.stat path).Unix.st_kind = Unix.S_REG
with Unix.Unix_error _ -> false
+(*</stdlib>*)
+
let inspect_mount_root g ?mount_opts_fn root =
let mps = g#inspect_get_mountpoints root in
let cmp (a,_) (b,_) =
diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli
index ad43345..7b142d4 100644
--- a/mllib/common_utils.mli
+++ b/mllib/common_utils.mli
@@ -16,6 +16,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 0211...
2017 Jun 15
0
[PATCH v6 04/41] mllib: Split ‘Common_utils’ into ‘Std_utils’ + ‘Common_utils’.
...lename =
- let chan = open_in filename in
- let line = input_line chan in
- close_in chan;
- line
-
-let is_regular_file path = (* NB: follows symlinks. *)
- try (Unix.stat path).Unix.st_kind = Unix.S_REG
- with Unix.Unix_error _ -> false
-
-(*</stdlib>*)
-
let inspect_mount_root g ?mount_opts_fn root =
let mps = g#inspect_get_mountpoints root in
let cmp (a,_) (b,_) =
diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli
index c088f8497..b72f7ee62 100644
--- a/mllib/common_utils.mli
+++ b/mllib/common_utils.mli
@@ -16,280 +16,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA...
2017 Jun 19
16
[PATCH v7 00/13] Refactor utilities
This is just the utilities part of the patch series from:
https://www.redhat.com/archives/libguestfs/2017-June/msg00103.html
I believe this addresses everything raised in comments on that
patch series.
Rich.
2017 Jun 09
12
[PATCH 00/12] Refactor utility functions.
This turned out to be rather more involved than I thought.
We have lots of utility functions, spread all over the repository,
with not a lot of structure. This moves many of them under common/
and structures them so there are clear dependencies.
This doesn't complete the job by any means. Other items I had on my
to-do list for this change were:
- Split up mllib/common_utils into:
-
2017 Jun 12
32
[PATCH v5 00/32] Refactor utilities, implement some APIs in OCaml.
This is a combination of:
https://www.redhat.com/archives/libguestfs/2017-June/msg00046.html
[PATCH 00/12] Refactor utility functions.
plus:
https://www.redhat.com/archives/libguestfs/2017-June/msg00023.html
[PATCH v3 00/19] Allow APIs to be implemented in OCaml.
with the second patches rebased on top of the utility refactoring, and
some other adjustments and extensions.
This passes
2017 Jun 15
45
[PATCH v6 00/41] Refactor utilities, reimplement inspection in the daemon.
v5:
https://www.redhat.com/archives/libguestfs/2017-June/msg00065.html
Since v5, this now implements inspection almost completely for Linux
and Windows guests.
Rich.
2017 Jun 21
45
[PATCH v8 00/42] Refactor utilities and reimplement inspection.
v7 was:
https://www.redhat.com/archives/libguestfs/2017-June/msg00169.html
https://www.redhat.com/archives/libguestfs/2017-June/msg00184.html
I believe this addresses all comments received so far.
Also it now passes a test where I compared about 100 disk images
processed with old and new virt-inspector binaries. The output is
identical in all cases except one which is caused by a bug in blkid