search for: eprintf

Displaying 20 results from an estimated 300 matches for "eprintf".

Did you mean: sprintf
2016 Feb 18
0
[PATCH 3/3] Add and use an helper error function
...ions(-) diff --git a/src/build.ml b/src/build.ml index 4675454..e34ec5f 100644 --- a/src/build.ml +++ b/src/build.ml @@ -65,10 +65,8 @@ let rec build debug if debug >= 1 then printf "supermin: build: %s\n%!" (String.concat " " inputs); - if inputs = [] then ( - eprintf "supermin: build: no input supermin appliance specified\n"; - exit 1; - ); + if inputs = [] then + error "build: no input supermin appliance specified"; (* When base images are seen, they are unpacked into this temporary * directory. But to speed things up, whe...
2016 Feb 18
4
[PATCH 0/3] supermin: miscellaneous cleanups
Hi, few cleanups in the supermin codebase; no actual functional change. Thanks, -- Pino Toscano (3): ext2: simplify tracking of visited modules utils: remove unused run_python function Add and use an helper error function src/build.ml | 20 +++++----------- src/dpkg.ml | 4 +--- src/ext2_initrd.ml | 10 ++++---- src/kernel.ml | 27
2014 Feb 11
4
[PATCH 0/3] virt-builder: copy local files instead of using curl
Hi, this patch serie does a small optimisation in virt-builder, i.e. make its internal Downloader just copy files when the source is a local URI, instead of spawn curl in this case too. Pino Toscano (3): builder: isolate C libraries in an own OCAMLCLIBS builder: prepare for different per-protocol download actions builder: do a copy when downloading local files builder/Makefile.am | 13
2017 Nov 21
0
[PATCH v13 2/3] builder: add a template parameter to get_index
...plier of this file to fix it and upload a fixed version.") uri in @@ -99,8 +99,23 @@ let get_index ~downloader ~sigchecker { Sources.uri; proxy } = let arch = try Index.Arch (List.assoc ("arch", None) fields) with Not_found -> - eprintf (f_"%s: no ‘arch’ entry for ‘%s’\n") prog n; - corrupt_file () in + if template then + let g = open_guestfs ~identifier:"template" () in + g#add_drive_ro file_uri; + g#launch (); + let roots = g#...
2017 Oct 27
0
[PATCH v11 5/8] builder: add a template parameter to get_index
...supplier of this file to fix it and upload a fixed version.") uri in @@ -99,8 +99,25 @@ let get_index ~downloader ~sigchecker { Sources.uri; proxy } = let arch = try Either (List.assoc ("arch", None) fields) with Not_found -> - eprintf (f_"%s: no ‘arch’ entry for ‘%s’\n") prog n; - corrupt_file () in + if template then + try + let g = new Guestfs.guestfs () in + g#add_drive_ro file_uri; + g#launch (); + let roots =...
2017 Nov 13
0
[PATCH v12 2/3] builder: add a template parameter to get_index
...plier of this file to fix it and upload a fixed version.") uri in @@ -99,8 +99,23 @@ let get_index ~downloader ~sigchecker { Sources.uri; proxy } = let arch = try Index.Arch (List.assoc ("arch", None) fields) with Not_found -> - eprintf (f_"%s: no ‘arch’ entry for ‘%s’\n") prog n; - corrupt_file () in + if template then + let g = new Guestfs.guestfs () in + g#add_drive_ro file_uri; + g#launch (); + let roots = g#inspect_os () in +...
2012 Sep 06
1
[LLVMdev] Cross-compiling llvm/clang osx -> win32
...64 --target=i386-winnt && make checking for clang... clang checking for C compiler default output file name... a.out [...snip...] llvm[4]: ======= Finished Linking Release+Asserts Executable clang-check (without symbols) warning: clang_darwin.mk: dropping arch 'i386' from lib 'eprintf' warning: clang_darwin.mk: dropping arch 'i386' from lib '10.4' warning: clang_darwin.mk: dropping arch 'x86_64' from lib '10.4' warning: clang_darwin.mk: dropping arch 'i386' from lib 'ios' warning: clang_darwin.mk: dropping arch 'x86_64'...
2017 Sep 12
0
[PATCH v8 3/7] builder: add a template parameter to get_index
...‘%s’ is corrupt.\nYou need to ask the supplier of this file to fix it and upload a fixed version.") uri @@ -100,8 +100,10 @@ let get_index ~downloader ~sigchecker let arch = try List.assoc ("arch", None) fields with Not_found -> - eprintf (f_"%s: no ‘arch’ entry for ‘%s’\n") prog n; - corrupt_file () in + if template then "" else ( + eprintf (f_"%s: no ‘arch’ entry for ‘%s’\n") prog n; + corrupt_file () + ) in let signature_ur...
2017 Sep 18
0
[PATCH v9 3/7] builder: add a template parameter to get_index
...‘%s’ is corrupt.\nYou need to ask the supplier of this file to fix it and upload a fixed version.") uri @@ -100,8 +100,10 @@ let get_index ~downloader ~sigchecker let arch = try List.assoc ("arch", None) fields with Not_found -> - eprintf (f_"%s: no ‘arch’ entry for ‘%s’\n") prog n; - corrupt_file () in + if template then "" else ( + eprintf (f_"%s: no ‘arch’ entry for ‘%s’\n") prog n; + corrupt_file () + ) in let signature_ur...
2017 Oct 05
0
[PATCH v11 3/6] builder: add a template parameter to get_index
...o ask the supplier of this file to fix it and upload a fixed version.") uri in @@ -99,8 +99,10 @@ let get_index ~downloader ~sigchecker { Sources.uri; proxy } = let arch = try List.assoc ("arch", None) fields with Not_found -> - eprintf (f_"%s: no ‘arch’ entry for ‘%s’\n") prog n; - corrupt_file () in + if template then "" else ( + eprintf (f_"%s: no ‘arch’ entry for ‘%s’\n") prog n; + corrupt_file () + ) in let signature_ur...
2012 Apr 03
1
[PATCH RFC] sysprep:add logging feature
...b/sysprep/sysprep_operation_cron_spool.ml @@ -16,12 +16,14 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) +open Printf open Sysprep_operation module G = Guestfs let cron_spool_perform g root = Array.iter g#rm_rf (g#glob_expand "/var/spool/cron/*"); + eprintf "Deleted /var/spool/cron/*\n"; [] let cron_spool_op = { diff --git a/sysprep/sysprep_operation_dhcp_client_state.ml b/sysprep/sysprep_operation_dhcp_client_state.ml index e3e87cb..18415c5 100644 --- a/sysprep/sysprep_operation_dhcp_client_state.ml +++ b/sysprep/sysprep_operation_dhc...
2016 Sep 13
1
[PATCH] v2v: -o glance: set all properties during creation (RHBZ#1374405)
...) properties - )) @ - [ name ] in - if run_command cmd <> 0 then ( - warning (f_"glance: failed to set image properties (ignored)"); - (* Dump out the image properties so the user can set them. *) - eprintf "Image properties:\n"; - eprintf " --min-ram %Ld\n" min_ram; - List.iter ( - fun (k, v) -> - eprintf " --property %s=%s" (quote k) (quote v) - ) properties - ) + )) in + if run_command cmd <&gt...
2014 Feb 20
4
[PATCH 1/2] mllib: add an hook to cleanup directories on exit
Much similar to unlink_on_exit, but recursively cleaning directories. --- mllib/common_utils.ml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 3943417..f49ede6 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -386,6 +386,35 @@ let unlink_on_exit = registered_handlers := true )
2016 Nov 30
0
Re: [PATCH] builder: Rearrange how template-building scripts work.
...open Printf > + > +let prog = "make-template" > + > +(* Check we are being run from the correct directory. We must do this > + * before attempting to load libraries below. > + *) > +let () = > + if not (Sys.file_exists "debian.preseed") then ( > + eprintf "%s: run this script from the builder/templates subdirectory\n" > + prog; > + exit 1 > + );; > + > +#load "str.cma";; > +#load "unix.cma";; > +#directory "../../ocaml";; > +#load "mlguestfs.cma";; > + > +...
2018 Jun 27
1
[PATCH] v2v: -o local: print libvirt XML
...68,7 +68,13 @@ class output_local dir = object let name = source.s_name in let file = dir // name ^ ".xml" in - with_open_out file (fun chan -> DOM.doc_to_chan chan doc) + with_open_out file (fun chan -> DOM.doc_to_chan chan doc); + + if verbose () then ( + eprintf "resulting local libvirt XML:\n%!"; + DOM.doc_to_chan stderr doc; + eprintf "\n%!"; + ) end let output_local = new output_local -- 2.17.1
2014 Sep 26
0
[PATCH v4 1/7] resize: add function find_partitions
...size.ml index 81bb270..cfd02fc 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -73,6 +73,9 @@ and partition_id = | MBR_ID of int (* MBR ID. *) | GPT_Type of string (* GPT UUID. *) +type partition_type = + | PrimaryPartition + let rec debug_partition p = eprintf "%s:\n" p.p_name; eprintf "\tpartition data: %ld %Ld-%Ld (%Ld bytes)\n" @@ -443,14 +446,15 @@ read the man page virt-resize(1). | MBR_ID _ | GPT_Type _ | No_ID -> false in - let partitions : partition list = + let find_partitions part_type = let parts = Ar...
2009 Nov 19
1
[PATCH] (Alternate?) locking patch
...ator.ml diff --git a/src/generator.ml b/src/generator.ml old mode 100644 new mode 100755 index c261ea2..30491e0 --- a/src/generator.ml +++ b/src/generator.ml @@ -10176,18 +10176,39 @@ let output_to filename = in close +let perror msg = function + | Unix.Unix_error (err, _, _) -> + eprintf "%s: %s\n" msg (Unix.error_message err) + | exn -> + eprintf "%s: %s\n" msg (Printexc.to_string exn) + (* Main program. *) let () = check_functions (); - if not (Sys.file_exists "HACKING") then ( - eprintf "\ + let lock_fd = + try Unix.open...
2014 Feb 03
2
[PATCH] resize: properly restore GPT partition types
...int option; (* MBR ID, if it has one. *) + p_gpt_type : string option; (* GPT ID, if it has one. *) p_type : partition_content; (* Content type and content size. *) (* What we're going to do: *) @@ -75,7 +76,14 @@ let rec debug_partition p = p.p_part.G.part_size; eprintf "\tbootable: %b\n" p.p_bootable; eprintf "\tpartition ID: %s\n" - (match p.p_mbr_id with None -> "(none)" | Some i -> sprintf "0x%x" i); + (match p.p_mbr_id, p.p_gpt_type with + | None, None -> "(none)" + | Some i, None ->...
2014 Feb 21
2
Re: [PATCH 2/2] builder: use a disposable GPG keyring for every Sigchecker
...r; > + (* Run gpg once, so it can setup its own home directory, failing > + * if it cannot. > + *) > + let cmd = sprintf "%s --homedir %s --list-keys%s" > + gpg tmpdir (if debug then "" else " >/dev/null 2>&1") in > + if debug then eprintf "%s\n%!" cmd; > + let r = Sys.command cmd in > + if r <> 0 then ( > + eprintf (f_"virt-builder: error: GPG failure: could not run GPG the first time\nUse the '-v' option and look for earlier error messages.\n"); > + exit 1 > + ); > { &...
2014 Sep 22
13
[PATCH v3 0/7] add support to resize MBR logical partitions
Hi Rich, This is v3 series to add support for resizing MBR logical partitions. changes to v2: 1. remove p_part_num 2. remove filter_parts 3. name the function calculate_target_partitions 4. remove the code to restart guest introduced in v2 changes to v1: 1. spit the patches so it's easier to review 2. fix the parted error caused by unaligned logical partitions 3. extend the