search for: bprintf

Displaying 20 results from an estimated 37 matches for "bprintf".

Did you mean: sprintf
2018 Feb 22
0
[PATCH 1/5] v2v: DOM: Add doc_to_string function.
...r.add_string buf (xml_quote_pcdata str) | Comment str -> - output_spaces chan indent; - fprintf chan "<!-- %s -->" (xml_quote_pcdata str) - | Element e -> element_to_chan ~indent chan e -and element_to_chan ?(indent = 0) chan + buffer_add_spaces buf indent; + bprintf buf "<!-- %s -->" (xml_quote_pcdata str) + | Element e -> + element_to_buf ~indent buf e +and element_to_buf ?(indent = 0) buf { e_name = name; e_attrs = attrs; e_children = children } = - output_spaces chan indent; - fprintf chan "<%s" name; - List.iter...
2016 Jul 07
0
[PATCH v3 2/8] curl: Change the API to use an abstract data type.
...g %s" (quote curl) (quote config_file) in let lines = external_command ~echo_cmd:false cmd in Unix.unlink config_file; lines -let print_curl_command chan curl_args = - fprintf chan "curl -q"; +let to_string { curl = curl; args = args } = + let b = Buffer.create 128 in + bprintf b "%s -q" (quote curl); List.iter ( function - | name, None -> fprintf chan " --%s" name + | name, None -> bprintf b " --%s" name (* Don't print passwords in the debug output. *) - | "user", Some _ -> fprintf chan " --u...
2016 Jul 07
0
[PATCH v2 2/8] curl: Change the API to use an abstract data type.
...g %s" (quote curl) (quote config_file) in let lines = external_command ~echo_cmd:false cmd in Unix.unlink config_file; lines -let print_curl_command chan curl_args = - fprintf chan "curl -q"; +let to_string { curl = curl; args = args } = + let b = Buffer.create 128 in + bprintf b "%s -q" (quote curl); List.iter ( function - | name, None -> fprintf chan " --%s" name + | name, None -> bprintf b " --%s" name (* Don't print passwords in the debug output. *) - | "user", Some _ -> fprintf chan " --u...
2015 Feb 27
0
[PATCH 4/4] convert_windows: split firstboot into steps
...818a 100644 --- a/v2v/convert_windows.ml +++ b/v2v/convert_windows.ml @@ -140,17 +140,10 @@ let convert ~verbose ~keep_serial_console (g : G.guestfs) inspect source = (* Perform the conversion of the Windows guest. *) let rec configure_firstboot () = - let fb = Buffer.create 1024 in - bprintf fb "@echo off\n"; + configure_rhev_apt (); + unconfigure_xenpv () - configure_rhev_apt fb; - unconfigure_xenpv fb; - - (* Write the completed script to the guest. *) - let firstboot_script = Buffer.contents fb in - Firstboot.add_firstboot_script g inspect.i_root &qu...
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
2016 Jul 07
4
[PATCH 0/3] Move Curl wrapper to mllib and use it for virt-builder.
Move the Curl wrapper module from virt-v2v to mllib. Use the module when virt-builder issues curl calls. Rich.
2018 Feb 22
11
[PATCH 0/5] v2v: Add -o rhv-upload output mode.
The first four patches are straightforward. The final patch adds the -o rhv-upload output mode. It is still spooling into a temporary file because I've had some trouble getting streaming conversions working. There are other problems as outlined in the commit message, so this patch is not ready for upstream but is good for discussion. Also I hit this, which I'm assuming for now will be
2016 Jul 07
12
[PATCH v3 0/8] v2v: Move Curl wrapper to mllib and more.
v2 -> v3: - Changes to the Curl API suggested by Pino.
2016 Jul 07
9
[PATCH v2 0/8] v2v: Move Curl wrapper to mllib and use it for virt-builder (and more).
v1 -> v2: - Fixed the bug with precedence of if / @. - Add some imperative list operators inspired by Perl, and use those for constructing the Curl arguments, and more. Rich.
2016 Dec 02
1
[PATCH NOT TO BE APPLIED] builder: make-template: Add --encrypted
I was attempting one way to solve: https://bugzilla.redhat.com/show_bug.cgi?id=1400332 "RFE: virt-builder should support templates with encrypted filesystems" However this approach doesn't really work because templates containing encrypted partitions cannot be compressed, and therefore the guest template would be a multi-gigabyte download. I better approach will likely be to use
2015 May 29
0
[PATCH v3] RFC: New virt-dib tool
...script_install_packages; + ); + + do_mkdir (destdir // "perm") + +let timing_output ~target_name entries timings = + let buf = Buffer.create 4096 in + Buffer.add_string buf "----------------------- PROFILING -----------------------\n"; + Buffer.add_char buf '\n'; + bprintf buf "Target: %s\n" target_name; + Buffer.add_char buf '\n'; + bprintf buf "%-40s %9s\n" "Script" "Seconds"; + bprintf buf "%-40s %9s\n" "---------------------------------------" "----------"; + Buffer.add_char buf ...
2016 Nov 30
0
Re: [PATCH] builder: Rearrange how template-building scripts work.
...+ | "ppc64le" -> PPC64le > + | "s390x" -> S390X > + | _ -> > + eprintf "%s: unknown or unsupported arch\n" prog; exit 1 Ditto. > +and make_kickstart_common ks_filename os arch = > + let buf = Buffer.create 4096 in > + let bpf fs = bprintf buf fs in > + > + bpf "\ > +# Kickstart file for %s > +# Generated by libguestfs.git/builder/templates/make-template.ml > + > +install > +text > +reboot > +lang en_US.UTF-8 > +keyboard us > +network --bootproto dhcp > +rootpw builder > +firewall --enable...
2015 Jul 03
1
[PATCH v5] New tool: virt-dib
...script_install_packages; + ); + + do_mkdir (destdir // "perm") + +let timing_output ~target_name entries timings = + let buf = Buffer.create 4096 in + Buffer.add_string buf "----------------------- PROFILING -----------------------\n"; + Buffer.add_char buf '\n'; + bprintf buf "Target: %s\n" target_name; + Buffer.add_char buf '\n'; + bprintf buf "%-40s %9s\n" "Script" "Seconds"; + bprintf buf "%-40s %9s\n" "---------------------------------------" "----------"; + Buffer.add_char buf ...
2015 Mar 31
0
[PATCH] WIP: New virt-dib tool
...uot;) script_install_packages; + + do_mkdir (destdir // "perm") + +let timing_output ~target_name entries timings = + let buf = Buffer.create 4096 in + Buffer.add_string buf "----------------------- PROFILING -----------------------\n"; + Buffer.add_char buf '\n'; + bprintf buf "Target: %s\n" target_name; + Buffer.add_char buf '\n'; + bprintf buf "%-40s %9s\n" "Script" "Seconds"; + bprintf buf "%-40s %9s\n" "---------------------------------------" "----------"; + Buffer.add_char buf ...
2015 Jun 16
2
[PATCH v4] RFC: New tool: virt-dib
...script_install_packages; + ); + + do_mkdir (destdir // "perm") + +let timing_output ~target_name entries timings = + let buf = Buffer.create 4096 in + Buffer.add_string buf "----------------------- PROFILING -----------------------\n"; + Buffer.add_char buf '\n'; + bprintf buf "Target: %s\n" target_name; + Buffer.add_char buf '\n'; + bprintf buf "%-40s %9s\n" "Script" "Seconds"; + bprintf buf "%-40s %9s\n" "---------------------------------------" "----------"; + Buffer.add_char buf ...
2017 Oct 08
0
[PATCH v2 3/4] common/mlstdutils: Introduce Option submodule.
...spect_types.ml b/daemon/inspect_types.ml index a687ea08c..1da41064d 100644 --- a/daemon/inspect_types.ml +++ b/daemon/inspect_types.ml @@ -143,38 +143,38 @@ and string_of_root { root_location; inspection_data } = and string_of_inspection_data data = let b = Buffer.create 1024 in let bpf fs = bprintf b fs in - may (fun v -> bpf " type: %s\n" (string_of_os_type v)) - data.os_type; - may (fun v -> bpf " distro: %s\n" (string_of_distro v)) - data.distro; - may (fun v -> bpf " package_format: %s\n" (string_of_package_format v)) - dat...
2017 Aug 09
0
[PATCH v12 08/11] daemon: Implement inspection types and utility functions.
...ot_location = location; + inspection_data = inspection_data } = + sprintf "%s:\n%s" + (string_of_location location) + (string_of_inspection_data inspection_data) + +and string_of_inspection_data data = + let b = Buffer.create 1024 in + let bpf fs = bprintf b fs in + may (fun v -> bpf " type: %s\n" (string_of_os_type v)) + data.os_type; + may (fun v -> bpf " distro: %s\n" (string_of_distro v)) + data.distro; + may (fun v -> bpf " package_format: %s\n" (string_of_package_format v)) + dat...
2016 Dec 14
4
[PATCH 0/4] sysprep: Remove various backup files.
https://bugzilla.redhat.com/show_bug.cgi?id=1401320 This series contains two new operations. The second -- and least controversial -- is "passwd-backups" which removes files such as /etc/passwd-, /etc/shadow- and so on. The first one ("backup-files") searches the whole guest filesystem for any regular file which looks like an editor backup file, such as "*~" and
2016 Dec 14
5
[PATCH v3 0/5] sysprep: Remove various backup files.
v3: - Split out test for "unix-like" guest OSes into separate commit. - Add guestfish --format=qcow2 to the test (x2). Rich.
2016 Dec 14
6
[PATCH v2 0/4] sysprep: Remove various backup files.
In v2: - The backup-files operation now operates on a conservative whitelist of filesystems, so it won't touch anything in /usr. Consequently it also runs much more quickly, about 4 seconds on the barebones virt-builder fedora-25 image. - Call Gc.compact () in visit_tests. - Added documentation to fnmatch.mli.