search for: output_str

Displaying 20 results from an estimated 142 matches for "output_str".

Did you mean: output_dir
2014 Nov 25
3
[PATCH] mllib: use Unix.isatty
...) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 295981c..9fcd8dd 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -207,15 +207,15 @@ let rec combine3 xs ys zs = (* ANSI terminal colours. *) let ansi_green ?(chan = stdout) () = - if TTY.isatty_stdout () then output_string chan "\x1b[0;32m" + if Unix.isatty Unix.stdout then output_string chan "\x1b[0;32m" let ansi_red ?(chan = stdout) () = - if TTY.isatty_stdout () then output_string chan "\x1b[1;31m" + if Unix.isatty Unix.stdout then output_string chan "\x1b[1;31m" let...
2014 Dec 15
2
(no subject)
Hi, I noticed the diff wasn't showing the "-" at the start of a deleted file and the details of the second file when attributes are different. This change should fix them. thanks.
2017 Nov 05
3
[PATCH 1/2] common/mlstdutils: Add with_open_in and with_open_out functions.
...else `Unknown + ) let is_partition dev = try diff --git a/dib/dib.ml b/dib/dib.ml index 9a8d86bd9..94ad3003a 100644 --- a/dib/dib.ml +++ b/dib/dib.ml @@ -60,10 +60,11 @@ let read_dib_envvars () = String.concat "" vars let write_script fn text = - let oc = open_out fn in - output_string oc text; - flush oc; - close_out oc; + with_open_out fn ( + fun oc -> + output_string oc text; + flush oc + ); Unix.chmod fn 0o755 let envvars_string l = diff --git a/generator/bindtests.ml b/generator/bindtests.ml index 4bdff8092..79b020326 100644 --- a/generator/bindt...
2014 Oct 13
0
[PATCH] ls: in CSV mode, always have a checksum field (RHBZ#1151900).
...m && is_reg (stat->st_mode)) { - csum = guestfs_checksum (g, checksum, path); - if (!csum) - exit (EXIT_FAILURE); + if (checksum) { + if (is_reg (stat->st_mode)) { + csum = guestfs_checksum (g, checksum, path); + if (!csum) + exit (EXIT_FAILURE); - output_string (csum); + output_string (csum); + } else if (csv) + output_string (""); } output_string (path); -- 1.9.3
2019 Mar 25
1
Re: [PATCH 2/4] common/mltools: make sure machine readable output is flushed
...b/common/mltools/tools_utils.ml > index 5a35708cd..ade4cb37f 100644 > --- a/common/mltools/tools_utils.ml > +++ b/common/mltools/tools_utils.ml > @@ -59,7 +59,11 @@ let machine_readable () = > | None -> None > | Some chan -> > let pr fs = > - ksprintf (output_string chan) fs > + let out s = > + output_string chan s; > + flush chan > + in > + ksprintf out fs > in > Some { pr } I was looking to see if any of the existing calls to machine_readable are using %! (a format directive which causes the cha...
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.
2020 Feb 19
2
[PATCH 0/1] virt-make-fs: add '--blocksize' option support
From: Nikolay Ivanets <stenavin@gmail.com> This patch adds 4096 bytes sector size for output disk. Side notes: While working on this patch I reveal long standing issue: virt-make-fs can fail if source directory/archive contains certain amount of really small or empty files or wide tree of directories. That is because of lack of available inodes on a small file system to keep files
2014 Dec 15
0
[PATCH] diff/diff.c: diff output to show correct file handles and presence symbol
--- diff/diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diff/diff.c b/diff/diff.c index 8b0fda0..6a374af 100644 --- a/diff/diff.c +++ b/diff/diff.c @@ -608,7 +608,7 @@ static void deleted (guestfs_h *g, struct file *file) { output_start_line (); - output_string ("+"); + output_string ("-"); output_file (g, file); output_end_line (); } @@ -669,7 +669,7 @@ changed (guestfs_h *g1, struct file *file1, output_end_line (); output_start_line (); output_string ("+"); - output_file (g1, file1); + output...
2018 Feb 22
0
[PATCH 1/5] v2v: DOM: Add doc_to_string function.
...44 --- a/v2v/DOM.ml +++ b/v2v/DOM.ml @@ -46,43 +46,48 @@ let e name attrs children = * we will be writing, ie. libvirt XML and OVF metadata, where * whitespace is generally not significant, but readability is useful. *) -let rec node_to_chan ?(indent = 0) chan = function - | PCData str -> output_string chan (xml_quote_pcdata str) +let rec node_to_buf ?(indent = 0) buf = function + | PCData str -> + Buffer.add_string buf (xml_quote_pcdata str) | Comment str -> - output_spaces chan indent; - fprintf chan "<!-- %s -->" (xml_quote_pcdata str) - | Element e -&gt...
2015 Oct 09
4
[PATCH 0/4] v2v: Use libvirt-supplied <vmware:datacenterpath> if available.
See earlier thread on libvir-list: https://www.redhat.com/archives/libvir-list/2015-September/thread.html#00201 Libvirt >= 1.2.20 supplies the correct dcPath parameter. If it is available in the libvirt XML, use it, otherwise fall back to the old method of trying to guess it from the vpx:// path. Patches 1, 2 and 4 are just refactoring around this change. Rich.
2015 Jan 02
2
(no subject)
Hi, we needed these changes when we had to build a guest image compatible with a starting guest image but not backed by it in any way? We needed some tool to check our progress, comparing original and? rebuilt (from scratch) images, and virt-diff seemed the best option, but? we had to soften the comparison to reduce the noise in the output. I added some options to ignore certain informations when
2020 Feb 19
0
[PATCH 1/1] virt-make-fs: add '--blocksize' option support
...g, "%d", &blocksize) != 1) + error (EXIT_FAILURE, 0, _("--blocksize option is not numeric")); } else error (EXIT_FAILURE, 0, _("unknown long option: %s (%d)"), @@ -678,11 +684,23 @@ do_make_fs (const char *input, const char *output_str) estimate, estimate / 1024, estimate / 4096); } + /* For partition alignment and extra space at the end of the disk: + * by default we create first partition at 128 sector boundary and leave the + * last 128 sectors at the end of the disk free. + */ + if (partition) +...
2020 Feb 24
1
[PATCH v2] virt-make-fs: add '--blocksize' option support
...g, "%d", &blocksize) != 1) + error (EXIT_FAILURE, 0, _("--blocksize option is not numeric")); } else error (EXIT_FAILURE, 0, _("unknown long option: %s (%d)"), @@ -678,11 +684,23 @@ do_make_fs (const char *input, const char *output_str) estimate, estimate / 1024, estimate / 4096); } + /* For partition alignment and extra space at the end of the disk: by + * default we create first partition at 128 sector boundary and leave the + * last 128 sectors at the end of the disk free. + */ + if (partition) +...
2019 Mar 28
8
[PATCH v2 0/4] OCaml tools: output messages as JSON machine
Enhance the output in machine parseable mode, by outputting all the messages of OCaml tools as JSON to the machine parseable stream. Related, although not strictly needed for this (and thus can be split if requested), is the addition of the fd format for the machine readable stream. Changes from v1: - use Obj.magic to convert int -> Unix.file_descr - add tests Pino Toscano (4):
2019 Mar 22
8
[PATCH 0/4] OCaml tools: output messages as JSON machine
Enhance the output in machine parseable mode, by outputting all the messages of OCaml tools as JSON to the machine parseable stream. Related, although not strictly needed for this (and thus can be split if requested), is the addition of the fd format for the machine readable stream. Pino Toscano (4): common/mltools: move the code for machine readable up common/mltools: make sure machine
2016 Jun 18
8
[PATCH 0/7] p2v: Multiple improvements to the look of virt-p2v.
In the run dialog, I have implemented an ANSI colour escape sequence interpreter, so that colours displayed by the remote virt-v2v are now shown to the user. (https://bugzilla.redhat.com/show_bug.cgi?id=1314244) This requires virt-v2v to send colours. It wasn't doing that because the output was a pipe (as we capture the output into the log file). So I added a global --colours option to make
2015 Jan 02
0
[PATCH] virt-diff: add additional ignore options
...->files[i].stat = stat; t->files[i].xattrs = xattrs; t->files[i].csum = csum; + t->files[i].stat_orig = stat_copy; + t->files[i].xattrs_orig = xattrs_copy; return 0; @@ -778,29 +827,29 @@ output_file (guestfs_h *g, struct file *file) filetype = "u"; output_string (filetype); - output_int64_perms (file->stat->st_mode & 07777); + output_int64_perms (file->stat_orig->st_mode & 07777); - output_int64_size (file->stat->st_size); + output_int64_size (file->stat_orig->st_size); /* Display extra fields when enabled. */...
2014 Oct 30
2
[PATCH 0/2] v2v: Add --password-file parameter (RHBZ#1158526).
These patches add the --password-file parameter, allowing you to pass a single password via a file. https://bugzilla.redhat.com/show_bug.cgi?id=1158526 Rich.
2016 Mar 02
1
[PATCH] make-fs: print error message on mkfs failure
...oduce a lot more output). --- make-fs/make-fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make-fs/make-fs.c b/make-fs/make-fs.c index ff291a1..561c6ae 100644 --- a/make-fs/make-fs.c +++ b/make-fs/make-fs.c @@ -773,8 +773,8 @@ do_make_fs (const char *input, const char *output_str) if (r == -1) { /* Provide more guidance in the error message (RHBZ#823883). */ - fprintf (stderr, "%s: 'mkfs' (create filesystem) operation failed.\n", - guestfs_int_program_name); + fprintf (stderr, "%s: 'mkfs' (create filesyste...
2019 Mar 22
0
[PATCH 2/4] common/mltools: make sure machine readable output is flushed
...ff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml index 5a35708cd..ade4cb37f 100644 --- a/common/mltools/tools_utils.ml +++ b/common/mltools/tools_utils.ml @@ -59,7 +59,11 @@ let machine_readable () = | None -> None | Some chan -> let pr fs = - ksprintf (output_string chan) fs + let out s = + output_string chan s; + flush chan + in + ksprintf out fs in Some { pr } -- 2.20.1