search for: lc_path

Displaying 19 results from an estimated 19 matches for "lc_path".

2016 Jun 03
2
[PATCH] v2v: copy all driver files into guest
...----------- 1 file changed, 11 deletions(-) diff --git a/v2v/windows_virtio.ml b/v2v/windows_virtio.ml index 6c8396c..354aa19 100644 --- a/v2v/windows_virtio.ml +++ b/v2v/windows_virtio.ml @@ -291,17 +291,6 @@ and virtio_iso_path_matches_guest_os path inspect = * elements. *) let lc_path = String.lowercase_ascii path in - let lc_basename = Filename.basename lc_path in - - let extension = - match last_part_of lc_basename '.' with - | Some x -> x - | None -> raise Not_found - in - - (* Skip files without specific extensions. *) - let extens...
2015 Aug 10
0
[PATCH 3/4] v2v: copy virtio drivers without guestfs handle leak
...- let files = - filter_map ( - fun (path, original_source, basename, get_contents) -> - try - (* Lowercased path, since the ISO may contain upper or lowercase - * path elements. XXX This won't work if paths contain non-ASCII. - *) - let lc_path = String.lowercase path in - let lc_basename = String.lowercase basename in - - let extension = - match last_part_of lc_basename '.' with - | Some x -> x - | None -> - error "v2v/find_virtio_win_drivers: missing '...
2016 Jun 03
0
Re: [PATCH] v2v: copy all driver files into guest
...> > diff --git a/v2v/windows_virtio.ml b/v2v/windows_virtio.ml > index 6c8396c..354aa19 100644 > --- a/v2v/windows_virtio.ml > +++ b/v2v/windows_virtio.ml > @@ -291,17 +291,6 @@ and virtio_iso_path_matches_guest_os path inspect = > * elements. > *) > let lc_path = String.lowercase_ascii path in > - let lc_basename = Filename.basename lc_path in > - > - let extension = > - match last_part_of lc_basename '.' with > - | Some x -> x > - | None -> raise Not_found > - in > - > - (* Skip files wi...
2015 Oct 06
0
[PATCH 3/5] mllib: Add (Char|String).(lower|upper)case_ascii functions.
...in = fun (path, original_source, basename, get_contents) -> try (* Lowercased path, since the ISO may contain upper or lowercase - * path elements. XXX This won't work if paths contain non-ASCII. + * path elements. *) - let lc_path = String.lowercase path in - let lc_basename = String.lowercase basename in + let lc_path = String.lowercase_ascii path in + let lc_basename = String.lowercase_ascii basename in let extension = match last_part_of lc_basename '.' with --...
2015 Oct 13
2
[PATCH v2 2/4] v2v: copy virtio drivers without guestfs handle leak
...le: %s") virtio_win msg - ) - else [] in - - let files = - filter_map ( - fun (path, original_source, basename, get_contents) -> - try - (* Lowercased path, since the ISO may contain upper or lowercase - * path elements. - *) - let lc_path = String.lowercase_ascii path in - let lc_basename = String.lowercase_ascii basename in +(* Given a path of a file relative to the root of the directory tree with + * virtio-win drivers, figure out if it's suitable for the specific Windows + * flavor. + *) +let match_vio_path_with_os p...
2015 Oct 07
1
Re: [PATCH 3/5] mllib: Add (Char|String).(lower|upper)case_ascii functions.
...l_source, basename, get_contents) -> > try > (* Lowercased path, since the ISO may contain upper or lowercase > - * path elements. XXX This won't work if paths contain non-ASCII. > + * path elements. > *) > - let lc_path = String.lowercase path in > - let lc_basename = String.lowercase basename in > + let lc_path = String.lowercase_ascii path in > + let lc_basename = String.lowercase_ascii basename in > > let extension = > match last_part_of lc_...
2015 Aug 10
15
[PATCH 0/4] v2v: simplify driver copying from virtio-win iso
Libguestfs supports passing an ISO image as a source of virtio windows drivers to v2v. That support, however, looks too heavy-weight: in order to access those drivers, a separate guestfs handle is created (and thus a new emulator process is started), which runs until v2v completes. This series attempts to make it simpler and lighter-weight, by making the relevant code more local, and by
2015 Oct 14
5
[PATCH v3 0/3] v2v: simplify driver copying from virtio-win iso
Libguestfs supports passing an ISO image as a source of virtio windows drivers to v2v. This series attempts to make it simpler and better scoped. Roman Kagan (3): v2v: consolidate virtio-win file copying v2v: copy virtio drivers without guestfs handle leak v2v: drop useless forced gc --- changes since v2: - drop patch 4 (reuse of the master guestfs handle for hot-adding the ISO image)
2016 Mar 04
2
[PATCH v2 0/2] v2v: Copy *.dll files since they can be part of the driver (RHBZ#1311373).
Since v1: - Fix a bug in the calculation of lc_basename. By luck this doesn't affect anything given the contents of the current ISO. - Don't copy the WdfCoInstaller*.dll files. Rich.
2015 Jun 23
0
[PATCH v2] v2v: Support loading virtio-win drivers from virtio-win.iso (RHBZ#1234351).
...+ let files = + filter_map ( + fun (path, original_source, basename, get_contents) -> + try + (* Lowercased path, since the ISO may contain upper or lowercase + * path elements. XXX This won't work if paths contain non-ASCII. + *) + let lc_path = String.lowercase path in + let lc_basename = String.lowercase basename in + + let extension = + let i = String.rindex lc_basename '.' in + let len = String.length lc_basename in + String.sub lc_basename (i+1) (len - (i+1)) in + +...
2015 Jul 01
0
[PATCH 2/3] mllib: add and use last_part_of
...b path (i+1) (len - (i+1)) in + let basename = last_part_of path '/' in (path, sprintf "%s:%s" virtio_win path, basename, fun () -> g#read_file path) @@ -198,10 +196,7 @@ let find_virtio_win_drivers virtio_win = let lc_path = String.lowercase path in let lc_basename = String.lowercase basename in - let extension = - let i = String.rindex lc_basename '.' in - let len = String.length lc_basename in - String.sub lc_basename (i+1) (len - (i+1)) in + l...
2015 Jun 23
2
[PATCH v2] v2v: Support loading virtio-win drivers from
In version 2: - Add a bunch of debugging output. - Recognize Windows Vista, Windows 10. - Compare driver paths case-insensitively.
2015 Oct 06
10
[PATCH 0/5] mllib: Hide bad String functions and miscellaneous refactoring.
Hide/prevent the use of bad string functions like String.lowercase. These are replaced by safe functions that won't break UTF-8 strings. Other miscellaneous refactoring. Rich.
2015 Jul 01
5
[PATCH 1/3] mllib: add an optional filter for rm_rf_only_files
This way it is possible to use rm_rf_only_files, but not removing specific files. --- mllib/common_utils.ml | 8 +++++++- mllib/common_utils.mli | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 516cff3..3737b4c 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -640,13 +640,19 @@ let rmdir_on_exit = *
2016 Mar 04
2
[PATCH v3 0/2] v2v: Copy *.dll files since they can be part of the
v2 -> v3 - Don't make a special case for WdfCoInstaller* files. There is a difference of opinion about whether copying these is necessary, but it seems like it is not harmful. Rich.
2016 Jun 04
1
[PATCH v2] v2v: copy all driver files into guest
...Win2008R2/netkvm.inf", Some win2k8r2_64; diff --git a/v2v/windows_virtio.ml b/v2v/windows_virtio.ml index 6c8396c..354aa19 100644 --- a/v2v/windows_virtio.ml +++ b/v2v/windows_virtio.ml @@ -291,17 +291,6 @@ and virtio_iso_path_matches_guest_os path inspect = * elements. *) let lc_path = String.lowercase_ascii path in - let lc_basename = Filename.basename lc_path in - - let extension = - match last_part_of lc_basename '.' with - | Some x -> x - | None -> raise Not_found - in - - (* Skip files without specific extensions. *) - let extens...
2015 Nov 17
0
[PATCH 3/3] v2v: windows: Use '*.inf' files to control how Windows drivers are installed.
...let { Types.i_major_version = os_major; i_minor_version = os_minor; - i_arch = arch; i_product_variant = os_variant } = inspect in +and parse_driver_ver inf_name sections = try - (* Lowercased path, since the ISO may contain upper or lowercase path - * elements. - *) - let lc_path = String.lowercase_ascii path in - let lc_basename = Filename.basename path in - - let extension = - match last_part_of lc_basename '.' with - | Some x -> x - | None -> raise Not_found - in - - (* Skip files without specific extensions. *) - let extension...
2015 Oct 06
0
[PATCH 5/5] mllib: Replace various ad hoc string_* functions with String.*
...r ">" ">" in str (* URI quoting. *) @@ -252,7 +252,7 @@ let find_virtio_win_drivers virtio_win = * "./drivers/amd64/Win2012R2/netkvm.sys". * Note we check lowercase paths. *) - let pathelem elem = string_find lc_path ("/" ^ elem ^ "/") >= 0 in + let pathelem elem = String.find lc_path ("/" ^ elem ^ "/") >= 0 in let arch = if pathelem "x86" || pathelem "i386" then "i386" else if pathelem &quo...
2015 Nov 17
8
[PATCH 0/3] v2v: windows: Use '*.inf' files to control how Windows drivers are installed.
https://github.com/rwmjones/libguestfs/tree/rewrite-virtio-copy-drivers Instead of trying to split and parse elements from virtio-win paths, use the '*.inf' files supplied with the drivers to control how Windows drivers are installed. The following emails best explain how this works: https://www.redhat.com/archives/libguestfs/2015-October/msg00352.html