search for: inspect_mount_root_ro

Displaying 15 results from an estimated 15 matches for "inspect_mount_root_ro".

2016 Mar 03
1
[PATCH] mllib: factor out mounting of guest root
Introduce and use a new inspect_mount_root function to mount all the mountpoints of a root in the guest, replacing the same code doing that in different tools. inspect_mount_root_ro is inspect_mount_root with readonly mount option. --- builder/builder.ml | 10 +--------- customize/customize_main.ml | 9 +-------- get-kernel/get_kernel.ml | 9 +-------- mllib/common_utils.ml | 18 ++++++++++++++++++ mllib/common_utils.mli...
2016 Jul 07
0
[PATCH 1/3] mllib: add checking for btrfs subvolume
...++++++++++ 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 () = Guestfs.Errno.errno_EINVAL then...
2016 Jul 08
0
[PATCHv2 1/3] mllib: add checking for btrfs subvolume
...| 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 + else raise exn diff --git a/mllib/comm...
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
2
Re: [PATCH 1/3] mllib: add checking for btrfs subvolume
...gt; 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#la...
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 07
0
Re: [PATCH 1/3] mllib: add checking for btrfs subvolume
...gt; > > > 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.Er...
2017 May 26
2
[PATCH 0/2] mllib: Export some more functions to the generator.
These functions are already linked to the generator, they're just not exported. Rich.
2020 Jan 22
0
[PATCH] mltools, options: support --allow-discards when decrypting LUKS devices
...+ keys_as_list allow_discards let with_timeout op timeout ?(sleep = 2) fn = let start_t = Unix.gettimeofday () in diff --git a/mltools/tools_utils.mli b/mltools/tools_utils.mli index ab70f58..309a033 100644 --- a/mltools/tools_utils.mli +++ b/mltools/tools_utils.mli @@ -194,7 +194,7 @@ val inspect_mount_root_ro : Guestfs.guestfs -> string -> unit val is_btrfs_subvolume : Guestfs.guestfs -> string -> bool (** Checks if a filesystem is a btrfs subvolume. *) -val inspect_decrypt : Guestfs.guestfs -> key_store -> unit +val inspect_decrypt : Guestfs.guestfs -> ?allow_discards:bool -&gt...
2016 Aug 02
2
[PATCH] mllib: move which and its exception from dib
...module from stdlib. *) +(** Exception thrown by [which] when the specified executable is not found + in [$PATH]. *) +exception Executable_not_found of string (* executable *) + val ( // ) : string -> string -> string (** Concatenate directory and filename. *) @@ -379,3 +383,8 @@ val inspect_mount_root_ro : Guestfs.guestfs -> string -> unit val is_btrfs_subvolume : Guestfs.guestfs -> string -> bool (** Checks if a filesystem is a btrfs subvolume. *) + +val which : string -> string +(** Return the full path of the specified executable from [$PATH]. + + Throw [Executable_not_foun...
2020 Jan 27
3
[PATCH v2 1/2] mltools, options: support --allow-discards when decrypting LUKS devices
...keys_as_list allow_discards let with_timeout op timeout ?(sleep = 2) fn = let start_t = Unix.gettimeofday () in diff --git a/mltools/tools_utils.mli b/mltools/tools_utils.mli index ab70f58..ac11a58 100644 --- a/mltools/tools_utils.mli +++ b/mltools/tools_utils.mli @@ -194,10 +194,14 @@ val inspect_mount_root_ro : Guestfs.guestfs -> string -> unit val is_btrfs_subvolume : Guestfs.guestfs -> string -> bool (** Checks if a filesystem is a btrfs subvolume. *) -val inspect_decrypt : Guestfs.guestfs -> key_store -> unit +val inspect_decrypt : Guestfs.guestfs -> ?allow_discards:bool -&gt...
2020 Jan 21
12
[PATCH 0/1] WIP: Support LUKS-encrypted partitions
The following patch attempts to implement sparsification of LUKS-encrypted partitions. It uses lsblk to pair the underlying LUKS block device with its mapped name. Also, --allow-discards was added by default to luks_open(). There are several potential issues that I can think of: 1) If and entire device is encrypted (not just one of more partitions), the lsblk trick might not work. 2) The
2018 Sep 19
0
[PATCH 2/2] Introduce a --key option in tools that accept keys
...--keys-from-stdin]. + In case [key_opts] is specified, {!recfield:cmdline_options.ks} will + contain the keys specified via [--key], so it ought to be passed around + where needed. [machine_readable] specifies whether add the [--machine-readable] option. @@ -188,7 +194,7 @@ val inspect_mount_root_ro : Guestfs.guestfs -> string -> unit val is_btrfs_subvolume : Guestfs.guestfs -> string -> bool (** Checks if a filesystem is a btrfs subvolume. *) -val inspect_decrypt : Guestfs.guestfs -> unit +val inspect_decrypt : Guestfs.guestfs -> key_store -> unit (** Simple implemen...
2018 Sep 19
5
[PATCH 0/2] RFC: --key option for tools
Hi, the following series adds a --key option in the majority of tools: this makes it possible to pass LUKS credentials programmatically, avoid the need to manually input them, or unsafely pass them via stdin. Thanks, Pino Toscano (2): mltools: create a cmdline_options struct Introduce a --key option in tools that accept keys builder/cmdline.ml | 2 +-
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
...** Checks whether the file is a regular file. *) +(*</stdlib>*) + val inspect_mount_root : Guestfs.guestfs -> ?mount_opts_fn:(string -> string) -> string -> unit (** Mounts all the mount points of the specified root, just like [guestfish -i] does. @@ -395,6 +449,10 @@ val inspect_mount_root_ro : Guestfs.guestfs -> string -> unit val is_btrfs_subvolume : Guestfs.guestfs -> string -> bool (** Checks if a filesystem is a btrfs subvolume. *) +exception Executable_not_found of string (* executable *) +(** Exception thrown by [which] when the specified executable is not found +...