search for: ansi_restor

Displaying 20 results from an estimated 35 matches for "ansi_restor".

Did you mean: ansi_restore
2014 Oct 05
0
[PATCH v5 1/7] tests: Introduce test harness for running tests.
...asives.stdout) () = + if isatty then output_string chan "\x1b[0;32m" +let ansi_red ?(chan = Pervasives.stdout) () = + if isatty then output_string chan "\x1b[1;31m" +let ansi_blue ?(chan = Pervasives.stdout) () = + if isatty then output_string chan "\x1b[1;34m" +let ansi_restore ?(chan = Pervasives.stdout) () = + if isatty then output_string chan "\x1b[0m" + +let is_dir path = + try (stat path).st_kind = S_DIR + with Unix_error _ -> false + +let is_file path = + try (stat path).st_kind = S_REG + with Unix_error _ -> false + +let is_executable path = +...
2015 Aug 06
0
[PATCH v4 01/17] tests: Introduce test harness for running tests.
...asives.stdout) () = + if isatty then output_string chan "\x1b[0;32m" +let ansi_red ?(chan = Pervasives.stdout) () = + if isatty then output_string chan "\x1b[1;31m" +let ansi_blue ?(chan = Pervasives.stdout) () = + if isatty then output_string chan "\x1b[1;34m" +let ansi_restore ?(chan = Pervasives.stdout) () = + if isatty then output_string chan "\x1b[0m" + +let is_dir path = + try (stat path).st_kind = S_DIR + with Unix_error _ -> false + +let is_file path = + try (stat path).st_kind = S_REG + with Unix_error _ -> false + +let is_executable path = +...
2016 Mar 19
1
[PATCH] tests/qemu: Add program for tracing and analyzing boot times.
...meline (void); +static void print_info (void); +static void print_analysis (void); +static void free_pass_data (void); +static void free_final_timeline (void); +static void ansi_green (void); +static void ansi_red (void); +static void ansi_blue (void); +static void ansi_magenta (void); +static void ansi_restore (void); + +static void +usage (int exitcode) +{ + fprintf (stderr, + "boot-analysis: Trace and analyze the appliance boot process.\n" + "Usage:\n" + " boot-analysis [--options]\n" + "Options:\n" + " -...
2019 Dec 03
7
[p2v PATCH 0/6] Use GLib a bit more
In an effort to reduce the code, start to use few bits of GLib: - replace the gnulib c-type module - replace the gnulib getprogname module - use g_spawn_sync to launch curl, and drop a file reading function Pino Toscano (6): Include glib.h in p2v.h Use g_ascii_isspace instead of c_isspace from gnulib Use g_get_prgname instead of getprogname from gnulib build: remove no more used gnulib
2016 Mar 23
7
[PATCH v4 0/6] tests/qemu: Add program for tracing and analyzing boot times.
v4: - Lots more analysis of the /init script and other parts. - Display a list of the longest to shortest activities. - Rebase on top of current head. Rich.
2023 Oct 08
1
[libnbd PATCH 2/2] info: Show human sizes for block_size values
...imum); >> + show_size ("block_size_preferred", block_preferred); >> + show_size ("block_size_maximum", block_maximum); >> } >> else { >> if (first) >> @@ -304,6 +301,21 @@ show_boolean (const char *name, bool cond) >> ansi_restore (fp); >> } >> >> +/* Used for displaying sizes in non-JSON output. */ >> +void show_size (const char *name, int64_t size) >> +{ >> + char size_str[HUMAN_SIZE_LONGEST]; >> + bool human_size_flag = false; >> + >> + if (size > 0) { >>...
2014 Nov 25
3
[PATCH] mllib: use Unix.isatty
...han "\x1b[1;34m" + if Unix.isatty Unix.stdout then output_string chan "\x1b[1;34m" let ansi_magenta ?(chan = stdout) () = - if TTY.isatty_stdout () then output_string chan "\x1b[1;35m" + if Unix.isatty Unix.stdout then output_string chan "\x1b[1;35m" let ansi_restore ?(chan = stdout) () = - if TTY.isatty_stdout () then output_string chan "\x1b[0m" + if Unix.isatty Unix.stdout then output_string chan "\x1b[0m" (* Timestamped progress messages, used for ordinary messages when not * --quiet. diff --git a/mllib/progress.ml b/mllib/progre...
2023 Oct 06
2
[libnbd PATCH 0/2] Improve nbdinfo display of block constraints
Based on Laszlo's approval of my idea here: https://listman.redhat.com/archives/libguestfs/2023-September/032661.html but as I would like to resync human-size.h back to nbdkit, I'm reluctant to apply patch 1 this until I get Rich's consent to relicensing (this email serves as my consent for my contribution here): https://listman.redhat.com/archives/libguestfs/2023-October/032755.html
2019 Mar 22
0
[PATCH 4/4] OCaml tools: output messages into JSON for machine readable
..._channel_from_fd" +external c_rfc3999_date_time_string : unit -> string = "guestfs_int_mllib_rfc3999_date_time_string" type machine_readable_fn = { pr : 'a. ('a, unit, string, unit) format4 -> 'a; @@ -85,12 +86,24 @@ let ansi_magenta ?(chan = stdout) () = let ansi_restore ?(chan = stdout) () = if colours () || istty chan then output_string chan "\x1b[0m" +let log_as_json msgtype msg = + match machine_readable () with + | None -> () + | Some { pr } -> + let json = [ + "message", JSON.String msg; + "timestamp",...
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
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 Mar 22
19
[PATCH v3 0/11] tests/qemu: Add program for tracing and analyzing boot times.
Lots of changes since v2, too much to remember or summarize. Please ignore patch 11/11, it's just for my testing. Rich.
2019 Mar 28
0
[PATCH v2 4/4] OCaml tools: output messages into JSON for machine readable
...t; "noalloc" +external c_rfc3999_date_time_string : unit -> string = "guestfs_int_mllib_rfc3999_date_time_string" type machine_readable_fn = { pr : 'a. ('a, unit, string, unit) format4 -> 'a; @@ -86,12 +87,24 @@ let ansi_magenta ?(chan = stdout) () = let ansi_restore ?(chan = stdout) () = if colours () || istty chan then output_string chan "\x1b[0m" +let log_as_json msgtype msg = + match machine_readable () with + | None -> () + | Some { pr } -> + let json = [ + "message", JSON.String msg; + "timestamp",...
2016 Mar 20
14
[PATCH v2 0/7] tests/qemu: Add program for tracing and analyzing boot times.
v1 was here: https://www.redhat.com/archives/libguestfs/2016-March/thread.html#00157 Not running the 'hwclock' command reduces boot times considerably. However I'm not sure if it is safe. See the question I posted on qemu-devel: http://thread.gmane.org/gmane.comp.emulators.qemu/402194 At the moment, about 50% of the time is consumed by SeaBIOS. Of this, about ⅓rd is SGABIOS
2014 Oct 04
4
[PATCH v4 0/4] tests: Introduce test harness for running tests.
This converts more of the tests (basically everything under tests/) to use the test harness, revealing some problems which have subsequently been fixed. Rich.
2016 Sep 08
4
[PATCH 0/3] Use gnulib's getprogname
Hi, this series update libguestfs to a recent gnulib version, so that we can use its new getprogname module, and solve altogether one of the porting issues (the need for 'program_name' by the error module of gnulib), and have a single way to get the name of the current program. A number of changes in tools mostly, although mechanical. Thanks, Pino Toscano (3): Update gnulib to latest
2014 Oct 05
12
[PATCH v5 0/7] tests: Introduce test harness for running tests.
Since v4: - More tests have been converted. - Testing local guests fixed. - Drop no-exec-stack test.
2014 Oct 23
10
[PATCH v6 00/10] tests: Introduce test harness for running tests.
For v6: This is mainly just a rebase, but I have also added tests in the ocaml/ language bindings directory, and for all the OCaml-written virt tools. Rich.
2014 Oct 24
10
[PATCH v7 00/10] tests: Introduce test harness for running tests.
v7: The only changes since v6 are those suggested by Pino in the review of v5.
2015 Jul 28
10
[PATCH 00/10] tests: Introduce test harness for running tests.
I should probably start by saying this patch series isn't ready for review yet. This patch series adds a test harness to libguestfs. It allows us to run the tests outside the ordinary 'make check' path in the build tree. In particular, you can use this to run tests when libguestfs has been installed. 'make check' and the other 'make check-*' rules still work. The