search for: filter_map

Displaying 20 results from an estimated 186 matches for "filter_map".

2017 Nov 21
2
[PATCH v3 0/2] common/mlstdutils: Extend the List module.
v2 -> v3: - Renamed List.assoc_ -> List.assoc_lbl. - Rebased on top of current master branch. Rich.
2017 Oct 08
4
[PATCH 0/3] common/mlstdutils: Add Std_utils List and Option modules.
In Std_utils we already extend Char and String. These commits take it a little further by extending List and adding a new Option submodule. All basically simple refactoring. Rich.
2017 Oct 08
7
[[PATCH v2 0/4] common/mlstdutils: Add Std_utils List and Option modules.
This time including the first commit ...
2018 Apr 27
0
[PATCH v5 2/3] daemon: list-filesystems: Don't list partitions which cannot hold file system.
...dev part) set - ) StringSet.empty partitions in - let devices = List.filter ( - fun dev -> - not (StringSet.mem dev devices_containing_partitions) - ) devices in + let mds = List.filter check_device mds in (* Use vfs-type to check for filesystems on devices. *) let ret = List.filter_map check_with_vfs_type devices in - (* Use vfs-type to check for filesystems on partitions, but - * ignore MBR partition type 42 used by LDM. - *) - let ret = - ret @ - List.filter_map ( - fun part -> - if not has_ldm || not (is_mbr_partition_type_42 part) then -...
2018 May 02
6
[PATCH v7 0/6] daemon: list_filesystems: filter out block devices which cannot hold filesystem.
This patch series addresses comments after v6 series review. Mykola Ivanets (6): daemon: Changing the way that we detect if a device contains partitions. daemon: list-filesystems: Ignore partitioned MD devices. tests: list-filesystems command ignores partitioned MD devices. daemon: list-filesystems: Change the way we filter out LDM partitions. daemon: list-filesystems: Filter out
2018 Jan 25
0
[PATCH v2 2/3] daemon: list-filesystems: Don't list partitions which cannot hold file system.
...dev part) set - ) StringSet.empty partitions in - let devices = List.filter ( - fun dev -> - not (StringSet.mem dev devices_containing_partitions) - ) devices in + let mds = List.filter check_device mds in (* Use vfs-type to check for filesystems on devices. *) let ret = List.filter_map check_with_vfs_type devices in - (* Use vfs-type to check for filesystems on partitions, but - * ignore MBR partition type 42 used by LDM. - *) - let ret = - ret @ - List.filter_map ( - fun part -> - if not has_ldm || not (is_mbr_partition_type_42 part) then -...
2018 Jun 01
7
[PATCH v8 0/6] daemon: list_filesystems: filter out block devices which cannot hold filesystem.
v8: - Rebased on top of master. v7: - Addresses comments after v6 series review. v6: - Addresses comments after v5 series review. - Large commit is splitted to more granular commits for better code review. v5: - Addresses comments after v4 series review (part_get_mbr_part_type doesn't break original implementation in C). - Rebased on top of master and little bit refactored for
2018 May 01
9
[PATCH v6 0/7] daemon: list_filesystems: filter out block devices which cannot hold filesystem
This patch series: 1. Addresses comments from v5 series review 2. Large commit is splitted to more granular commits for better code review. Mykola Ivanets (6): daemon: Changing the way that we detect if a device contains partitions. daemon: list-filesystems: Ignore partitioned MD devices. tests: list-filesystems command ignores partitioned MD devices. daemon: list-filesystems: Change
2018 Jan 28
9
guestfs_list_filesystems: skip block devices which cannot hold file system
Initial discussion is here: https://www.redhat.com/archives/libguestfs/2018-January/msg00188.html. v2 was posted here: https://www.redhat.com/archives/libguestfs/2018-January/msg00246.html. v3 comparing to v2 is just a rebase with slightly changed commits comments.
2018 Jan 25
2
[PATCH v2 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
Instead of parsing 'parted' output OCaml implementation relies on the following facts: 1. The function is applicable for MBR partitions only (as noted in documentation and as function name suggests). 2. An attempt to call the function for non-MBR partition fails with "part_get_mbr_part_type can only be used on MBR Partitions" error and NULL is returned. 3. MBR partition table
2017 Jul 20
1
Re: [PATCH 19/27] daemon: Reimplement ‘list_filesystems’ API in the daemon, in OCaml.
...dd part set ) partitions StringSet.empty in (* Remove *) let devices = List.filter ( fun dev -> not (StringSet.mem dev devices_of_partitions) ) devices in let devices = devices @ partitions in > + (* Use vfs-type to check for filesystems on devices. *) > + let ret = filter_map check_with_vfs_type devices in > + > + (* Use vfs-type to check for filesystems on partitions, but > + * ignore MBR partition type 42 used by LDM. > + *) > + let ret = > + ret @ > + filter_map ( > + fun part -> > + if not has_ldm || not (i...
2018 Jun 01
0
[PATCH v8 1/6] daemon: Changing the way that we detect if a device contains partitions.
...ringSet.empty partitions in - let devices = List.filter ( - fun dev -> - not (StringSet.mem dev devices_containing_partitions) - ) devices in - - (* Use vfs-type to check for filesystems on devices. *) + let devices = List.filter is_not_partitioned_device devices in let ret = List.filter_map check_with_vfs_type devices in (* Use vfs-type to check for filesystems on partitions, but * ignore MBR partition type 42 used by LDM. *) + let partitions = Devsparts.list_partitions () in let ret = ret @ List.filter_map ( @@ -60,6 +44,7 @@ let rec list_filesystems () =...
2018 May 01
0
[PATCH v6 2/7] daemon: Changing the way that we detect if a device contains partitions.
...ringSet.empty partitions in - let devices = List.filter ( - fun dev -> - not (StringSet.mem dev devices_containing_partitions) - ) devices in - - (* Use vfs-type to check for filesystems on devices. *) + let devices = List.filter is_not_partitioned_device devices in let ret = List.filter_map check_with_vfs_type devices in (* Use vfs-type to check for filesystems on partitions, but * ignore MBR partition type 42 used by LDM. *) + let partitions = Devsparts.list_partitions () in let ret = ret @ List.filter_map ( @@ -60,6 +44,7 @@ let rec list_filesystems () =...
2018 Apr 27
4
[PATCH v5 0/3] libguestfs: guestfs_list_filesystems: skip block devices which cannot hold file system
This patch series: 1. Addresses comments from last review: part_get_mbr_part_type doesn't break original implementation in C. 2. Rebased on top of master and little bit refactored for readability. Mykola Ivanets (1): tests: md: Test guestfish list-filesystems command skips partitioned md devices. Nikolay Ivanets (2): daemon: Reimplement 'part_get_mbr_part_type' API in
2016 Aug 26
11
[PATCH v2 0/7] v2v: first bits of Debian/Ubuntu guests supports
Hi, this series implements the first bits in v2v to convert Debian/Ubuntu (and derived) guests. The series does not complete the support (see known issues below), but all the patches here should be fit for review and inclusion. The series does not enable the conversion, yet. Known issues: * there is no grubby nor Bootloader::Tools Perl module available in Debian, so there is no way to know
2018 Dec 03
4
[supermin PATCH 0/2] Create a really empty base.tar.gz
See patch #2 for more explanation. Pino Toscano (2): prepare: keep config_files available for longer prepare: create a really empty base.tar.gz with no config files src/mode_prepare.ml | 87 +++++++++++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 35 deletions(-) -- 2.17.2
2016 Sep 09
0
[PATCH] v2v: linux: Move kernel detection to a separate module.
...\\)?$" in - let rex_ko_extract = Str.regexp ".*/\\([^/]+\\)\\.k?o\\(\\.xz\\)?$" in - let rex_initrd = - if family = `Debian_family then - Str.regexp "^initrd.img-.*$" - else - Str.regexp "^initr\\(d\\|amfs\\)-.*\\(\\.img\\)?$" in - filter_map ( - function - | { G.app2_name = name } as app - when name = "kernel" || String.is_prefix name "kernel-" - || String.is_prefix name "linux-image-" -> - (try - (* For each kernel, list the files directly owned by the...
2016 Sep 09
2
[PATCH] v2v: linux: Move kernel detection to a separate module.
This is a sort of follow-up to the Linux_bootloaders patch. It turns out all the kernel detection code is nicely self- contained and can therefore be moved to its own module. Rich.
2016 Aug 23
1
[PATCH] mllib: do not assume $PATH is set
...ally = match r with Either ret -> ret | Or exn -> raise exn let which executable = - let paths = String.nsplit ":" (Sys.getenv "PATH") in + let paths = + try String.nsplit ":" (Sys.getenv "PATH") + with Not_found -> [] in let paths = filter_map ( fun p -> let path = p // executable in -- 2.7.4
2018 Dec 03
0
[supermin PATCH 1/2] prepare: keep config_files available for longer
...pare.ml @@ -128,28 +128,28 @@ let prepare debug (copy_kernel, format, host_cpu, * be missing either from the package or from the filesystem (the * latter case with --use-installed). *) - let files_from = - let config_files = - List.map ( - fun (_, files) -> - filter_map ( - function - | { ft_config = true; ft_path = path } -> Some path - | { ft_config = false } -> None - ) files - ) packages in - let config_files = List.flatten config_files in - - let config_files = List.filter ( - fun path -> -...