Displaying 8 results from an estimated 8 matches for "regexp_str".
Did you mean:
regex_str
2015 Feb 27
0
[PATCH 1/4] firstboot: consolidate line ending conversion
...git a/customize/firstboot.ml b/customize/firstboot.ml
index 23a0432..ffcee12 100644
--- a/customize/firstboot.ml
+++ b/customize/firstboot.ml
@@ -24,6 +24,9 @@ open Common_gettext.Gettext
open Customize_utils
open Regedit
+let unix2dos s =
+ String.concat "\r\n" (Str.split_delim (Str.regexp_string "\n") s)
+
(* For Linux guests. *)
module Linux = struct
let firstboot_dir = "/usr/lib/virt-sysprep"
@@ -207,22 +210,18 @@ module Windows = struct
* scripts in the directory. Note we need to use CRLF line endings
* in this script.
*)
- let firstboot...
2015 Feb 27
5
[PATCH 0/4] firstboot: assorted enhancements
This patchset attempts to address a number of shortcomings in the
firstboot infrastructure I came across while working with v2v conversion
of various Windows VMs.
Roman Kagan (4):
firstboot: consolidate line ending conversion
firstboot: enhance firstboot driver script for Windows
firstboot: make script naming descriptive
convert_windows: split firstboot into steps
2017 Sep 20
4
[PATCH 0/4] Replace some uses of the Str module with PCRE.
Str is a pretty ugly regexp module. Let's try to replace it with
PCRE. This series of commits goes some small way towards that
eventual goal.
- - -
I wonder if there was a deep reason why we had this?
let unix2dos s =
String.concat "\r\n" (Str.split_delim (Str.regexp_string "\n") s)
I replaced it with what I think should be (nearly) equivalent:
let unix2dos s =
String.concat "\r\n" (String.nsplit "\n" s)
Rich.
2020 May 15
1
[PATCH] v2v: fix UEFI bootloader for linux guests
...let rex = PCRE.compile "^\\(hd.*\\)" in
PCRE.replace rex ""
+(* Standard uefi fallback path *)
+let uefi_fallback_path =
+ "/boot/efi/EFI/BOOT/"
+
+(* Helper function checks if 'source' contains 's' *)
+let contains source s =
+ let re = Str.regexp_string s in
+ try
+ ignore (Str.search_forward re source 0);
+ true
+ with Not_found -> false
+
+(* Helper function to get architecture suffixes for uefi files *)
+let get_uefi_arch_suffix arch =
+ let arch_suffix =
+ if contains arch "x86_64" then "X64"
+...
2020 Jul 24
3
[PATCH v2] v2v: fix UEFI bootloader for linux guests
...match inspect.i_firmware with
+ | I_UEFI _ -> (
+ (* Standard uefi fallback path *)
+ let uefi_fallback_path = "/boot/efi/EFI/BOOT/" in
+
+ (* Helper function checks if 'source' contains 's' *)
+ let contains source s = (
+ let re = Str.regexp_string s in
+ try
+ ignore (Str.search_forward re source 0);
+ true
+ with Not_found -> false
+ ) in
+
+ let cant_fix_uefi () =
+ info (f_"Can't fix UEFI bootloader. VM may not boot.")
+ in
+
+ let get_uefi_arch_suffix = functi...
2014 Aug 21
2
[PATCH] v2v: adding input -i ova
Shahar:
This is the same patch as you posted, but I have rebased it on top of
current HEAD.
You'll have to do save the next email to a file, and do:
git reset --hard HEAD^
git pull
git am /path/to/saved_email
There are no changes in this patch, except what is needed to make it
compile. Will follow-up with comments.
Rich.
2017 Sep 21
18
[PATCH v2 00/18] Replace many more uses of the Str module with PCRE.
...s which cannot use PCRE because it
cannot depend on C code. But pretty much everything else has been
converted now.
- - -
Same question as before:
> I wonder if there was a deep reason why we had this?
>
> let unix2dos s =
> String.concat "\r\n" (Str.split_delim (Str.regexp_string "\n") s)
>
> I replaced it with what I think should be (nearly) equivalent:
>
> let unix2dos s =
> String.concat "\r\n" (String.nsplit "\n" s)
Rich.
2017 Sep 22
27
[PATCH v3 00/22] Replace almost all uses of the Str module with PCRE.
...it's
not possible to replace Str in common/mlstdutils or the generator
because those are pure OCaml).
As before there is an outstanding question:
> I wonder if there was a deep reason why we had this?
>
> let unix2dos s =
> String.concat "\r\n" (Str.split_delim (Str.regexp_string "\n") s)
>
> I replaced it with what I think should be (nearly) equivalent:
>
> let unix2dos s =
> String.concat "\r\n" (String.nsplit "\n" s)
Rich.