search for: push_front

Displaying 20 results from an estimated 120 matches for "push_front".

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 ...
2016 Oct 04
1
[PATCH] v2v: linux: try to fix removal of VMware tools
...ommand_lines cmd in - let replacements = Array.to_list replacements in - - let cmd = [ "yum"; "install"; "-y" ] @ replacements in - let cmd = Array.of_list cmd in - (try - ignore (g#command cmd); - push_front library remove - with G.Error msg -> - eprintf "%s: could not install replacement for %s. Error was: %s. %s was not removed.\n" - prog library msg library + if provides <> [] then ( + (* Trim whitespace. *) +...
2018 Jun 21
0
[PATCH v2] p2v: Allow virt-v2v input and output drivers containing '-' (RHBZ#1590220).
...te forward", 0); } diff --git a/v2v/modules_list.ml b/v2v/modules_list.ml index 91b029b07..b7accc4f9 100644 --- a/v2v/modules_list.ml +++ b/v2v/modules_list.ml @@ -21,8 +21,15 @@ open Std_utils let input_modules = ref [] and output_modules = ref [] -let register_input_module name = List.push_front name input_modules -and register_output_module name = List.push_front name output_modules +(* Must match the regular expressions in p2v/ssh.c *) +let module_name_re = PCRE.compile ~anchored:true "[-\\w]+" + +let register_input_module name = + assert (PCRE.matches module_name_re name); +...
2019 Oct 15
4
Splitting the large libguestfs repo
I got a little way into this. The two attached patches are preliminary work. My proposed split is: libguestfs.git common -> git submodule libguestfs-common.git generator/ lib/ all language bindings C based tools (eg. virt-df, virt-edit, guestfish) guestfs-tools.git common -> git submodule libguestfs-common.git
2018 Jun 21
2
p2v: Allow virt-v2v input and output drivers containing '-' (RHBZ#1590220).
v1 was here: https://www.redhat.com/archives/libguestfs/2018-June/msg00047.html v1 -> v2: - Add a regular expression in the virt-v2v modules code too. - - - I was planning a much more ambitious second version of this patch (half written too) which had: virt-v2v --describe-modules that listed a big chunk of XML which virt-p2v would parse. These would include the names of the
2017 Oct 08
1
Re: [PATCH v11 5/6] mllib: add XPath helper xpath_get_nodes()
...j_node obj i in > + push_back nodes node > + done; > + !nodes ‘push_back’ is unfortunately O(n) and no tail recursive, and so the whole loop is O(n²). It's going to be much more efficient therefore to build the list up in reverse and reverse it at the end: for ... ... push_front node nodes done; List.rev !nodes Despite that problem this seems like quite a useful function, it would be nice to extend this commit so it changes existing code to use the function. Grepping the code for ‘Xml.xpathobj_nr_nodes.*- 1’ shows some candidates. In v2v/output_libvirt.ml we present...
2018 Dec 05
1
[PATCH v4] v2v: don't fail when virtio-win does not have qemu-ga
This is why I shouldn't program before lunchtime ... v2 & v3 omitted gettext (‘f_()’) annotations around the warning and error strings. Fixed in this version. My cover letter for v2 still applies here. Rich.
2018 Dec 04
2
[PATCH] v2v: don't fail when virtio-win does not have qemu-ga packages
...ng.lowercase_ascii (Filename.basename path) in - let target = destdir // target_name in - debug "windows: copying guest tools bits: 'host:%s' -> '%s'" - source target; - - g#write target (read_whole_file source); - List.push_front target_name ret - ) - ) paths + if not (is_directory srcdir) then ( + let msg = f_"cannot locate directory '%s' in virtio-win directory" in + if ok_if_missing then ( + warning msg srcdir; + ) + else + error msg srcdir + ) else (...
2018 Dec 05
1
[PATCH v2] v2v: don't fail when virtio-win does not have qemu-ga
This is my version of this patch which I think improves it in a number of ways. Firstly instead of having the bare boolean parameter ‘ok_if_missing’ we pass in the function we want to call along the directory missing path. This change then allows us to print a more useful error or warning message given the context of the call, and the new message is actionable too, so the user knows what has to
2018 Dec 05
1
[PATCH v3] v2v: don't fail when virtio-win does not have qemu-ga
Sorry, there was a small mistake in v2 of the patch. The difference between v2 & v3 is below. All my other comments in the cover letter of v2 also apply here. Rich. --- a/v2v/windows_virtio.ml +++ b/v2v/windows_virtio.ml @@ -293,8 +293,7 @@ and copy_drivers g inspect driverdir = [] <> copy_from_virtio_win g inspect "/" driverdir virtio_iso_path_matches_guest_os
2018 Oct 04
3
[PATCH 0/2] v2v: uninstall VMware tools on all Linux guests
Hi, this patch series attempt to uninstall VMware tools on all the Linux guests, and reduce the uninstallation time needed in some cases: - v2v tries to workaround the slowest part of the tarball-installed VMware tools - v2v uninstalls the open source VMware tools (open-vm-tools) Thanks, Pino Toscano (2): v2v: linux: remove open-vm-tools packages v2v: linux: try to trick
2016 Jul 19
2
[PATCH v2 1/2] v2v: register also aliases of input/output modules
...ot;local" "disk" diff --git a/v2v/modules_list.ml b/v2v/modules_list.ml index 36a08c0..5649b02 100644 --- a/v2v/modules_list.ml +++ b/v2v/modules_list.ml @@ -21,11 +21,28 @@ open Common_utils let input_modules = ref [] and output_modules = ref [] -let register_input_module name = push_front name input_modules -and register_output_module name = push_front name output_modules +let rec register_input_module ?alias name = register ?alias name input_modules +and register_output_module ?alias name = register ?alias name output_modules +and register ?alias name l = + push_front (name, false...
2019 Feb 27
2
[PATCH] v2v: linux: do not uninstall open-vm-tools w/ ubuntu-server
..."ubuntu-server" + ) inspect.i_apps + else false in List.iter ( fun { G.app2_name = name } -> if String.is_prefix name "vmware-tools-libraries-" then @@ -301,7 +313,7 @@ let convert (g : G.guestfs) inspect source output rcaps = List.push_front name remove else if String.is_prefix name "open-vm-tools-" then List.push_front name remove - else if name = "open-vm-tools" then + else if name = "open-vm-tools" && not has_ubuntu_server then List.push_front name re...
2016 Jul 08
2
Re: [PATCH v3 4/8] mllib: Add some imperative list manipulation functions.
...gt; new functions do the same as Perl ones.) > > I agree, but for consistency I thought it was better to keep those > names rather than trying to think up new ones which would be different > from everything else. Actually I forgot that C++ (STL vector, deque etc) have functions called push_front, pop_front, push_back, pop_back. Don't know if that would be better. Is it obvious what front and back mean? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly bu...
2018 Nov 07
1
Re: [PATCH v3 1/3] v2v: refactor copy_drivers() in Windows_virtio
...let target = destdir // target_name in > + debug "windows: copying guest tools bits: 'host:%s' -> '%s'" > source target; > > g#write target (read_whole_file source); > - ret := true > + List.push_front target_name ret This will return the list of files backwards (if that matters), but is also more efficient than using push_back. > ) > ) paths > ) > else if is_regular_file virtio_win then ( > - debug "windows: copy_drivers: source ISO virtio_win %s&qu...
2017 Oct 27
0
[PATCH v11 7/8] mllib: add XPath helper xpath_get_nodes
...xpath_int = xpath_eval int_of_string let xpath_int64 = xpath_eval Int64.of_string + +let xpath_get_nodes xpathctx expr = + let obj = Xml.xpath_eval_expression xpathctx expr in + let nodes = ref [] in + for i = 0 to Xml.xpathobj_nr_nodes obj - 1 do + let node = Xml.xpathobj_node obj i in + push_front node nodes + done; + List.rev !nodes diff --git a/common/mltools/xpath_helpers.mli b/common/mltools/xpath_helpers.mli index 3a8190b05..3a2607aeb 100644 --- a/common/mltools/xpath_helpers.mli +++ b/common/mltools/xpath_helpers.mli @@ -25,3 +25,7 @@ val xpath_int : Xml.xpathctx -> string -> i...
2017 Mar 13
0
[PATCH 2/2] v2v: -i ova: Factor out the OVF parsing into a separate module.
...act doc) in - debug "json: %s" uri; - uri - ) in - - let disk = { - s_disk_id = i; - s_qemu_uri = qemu_uri; - s_format = Some "vmdk"; - s_controller = controller; - } in - push_front disk disks; - ) else - error (f_"could not parse disk rasd:HostResource from OVF document") - done in - let disks = List.rev !disks in - - (* Floppies (ResourceType = 14), CDs (ResourceType = 15) and - * CDROMs (ResourceType = 16). (What is the difference?)...
2018 Nov 07
0
[PATCH v3 1/3] v2v: refactor copy_drivers() in Windows_virtio
...ename.basename path) in + let target = destdir // target_name in + debug "windows: copying guest tools bits: 'host:%s' -> '%s'" source target; g#write target (read_whole_file source); - ret := true + List.push_front target_name ret ) ) paths ) else if is_regular_file virtio_win then ( - debug "windows: copy_drivers: source ISO virtio_win %s" virtio_win; + debug "windows: copy_from_virtio_win: guest tools source ISO %s" virtio_win; try let g2 = open_...