search for: guestfs_user_cancel

Displaying 18 results from an estimated 18 matches for "guestfs_user_cancel".

2012 Jan 18
4
[PATCH 1/4] ocaml: Add -Wno-missing-field-initializers to avoid a warning.
From: "Richard W.M. Jones" <rjones at redhat.com> --- configure.ac | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index fa97479..6e42423 100644 --- a/configure.ac +++ b/configure.ac @@ -141,6 +141,10 @@ if test "$gl_gcc_warnings" = yes; then # Work around warning in src/inspect.c. This seems to be a bug in gcc
2011 Jul 15
8
[PATCH 0/8] Implement user cancellation
...ed to cancel transfers where there is an error. For example, if the library gets an error while reading a local file during an upload, it already cancels the transfer. Therefore the only thing left to do is to expose cancellation to library callers. This is done through the new API call: void guestfs_user_cancel (guestfs_h *g); This call is signal safe and thread safe. It is, in fact, designed to be called from a SIGINT signal handler (to handle ^C being pressed by the user during a transfer). You could also wire it up to a cancel button called from another thread, or use it in other ways. There are th...
2015 May 26
6
[PATCH 0/6] Update the way that API versions are generated for the man page.
The existing mechanism was clunky, slow and used ~ 10 MB of local disk. Rich.
2012 Mar 28
1
[PATCH] Split gobject sources into 1 file per class
This patch replaces patches 14 and 15 from my previous series. The gtk-doc output is now reasonable, and we can rely on an automatically generated guestfs-sections.txt. Matt
2012 Apr 26
3
[PATCH 1/3] gobject: NFC generated code formatting fix
--- generator/generator_gobject.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/generator_gobject.ml b/generator/generator_gobject.ml index e4c175b..48ddbf0 100644 --- a/generator/generator_gobject.ml +++ b/generator/generator_gobject.ml @@ -391,7 +391,7 @@ let generate_gobject_optargs_source name optargs flags () = pr "G_DEFINE_TYPE(%s, guestfs_%s,
2015 Oct 16
2
[PATCH v6 0/2] RFE: journal reader in guestfish
Output is configurable, it's the same format as virt-log has, since both uses same code. First patch moves get_journal_field around and renames it to journal_view and the next one reimplements it a bit and brings it to guestfish. Maros Zatko (2): cat: move get_journal_field to fish/journal.c fish: add journal-view command (RHBZ#988100) .gnulib | 2 +-
2019 Aug 12
1
[PATCH] Fix small issues in documentations of APIs
...tory, -there is no cwd). The '.' and '..' entries are not returned, but +there is no cwd). The C<.> and C<..> entries are not returned, but hidden files are shown." }; { defaults with @@ -1271,7 +1271,7 @@ There are two common places that you might call C<guestfs_user_cancel>: In an interactive text-based program, you might call it from a C<SIGINT> signal handler so that pressing C<^C> cancels the current -operation. (You also need to call L</guestfs_set_pgroup> so that +operation. (You also need to call C<guestfs_set_pgroup> so that c...
2016 Oct 03
3
[PATCH v2 0/2] New tool: virt-tail.
Nothing new in the virt-tail command itself, but the second commit includes a simple test. Rich.
2016 Oct 03
0
[PATCH v2 1/2] New tool: virt-tail.
...+ exit (r == 0 ? EXIT_SUCCESS : EXIT_FAILURE); +} + +struct follow { + int64_t mtime; /* For each file, last mtime. */ + int64_t size; /* For each file, last size. */ +}; + +static int quit = 0; + +static void +user_cancel (int sig) +{ + quit = 1; + ignore_value (guestfs_user_cancel (g)); +} + +static int +do_tail (int argc, char *argv[], /* list of files in the guest */ + struct drv *drvs, struct mp *mps) +{ + struct sigaction sa; + time_t drvt; + int first_iteration = 1; + int prev_file_displayed = -1; + CLEANUP_FREE struct follow *file = NULL; + + /* Allocate...
2016 Oct 01
1
[PATCH] New tool: virt-tail.
This adds a new tool which does a follow operation (ie. tail -f) on one or more log/text files inside the guest. I've only done limited testing, but it works for me for tailing various long-running builds inside guests which I'm doing at the moment. There are no tests at present. Rich.
2016 Oct 03
0
[PATCH v3 1/2] New tool: virt-tail.
...r == 0 ? EXIT_SUCCESS : EXIT_FAILURE); +} + +struct follow { + int64_t mtime; /* For each file, last mtime. */ + int64_t size; /* For each file, last size. */ +}; + +static sig_atomic_t quit = 0; + +static void +user_cancel (int sig) +{ + quit = 1; + ignore_value (guestfs_user_cancel (g)); +} + +static int +do_tail (int argc, char *argv[], /* list of files in the guest */ + struct drv *drvs, struct mp *mps) +{ + struct sigaction sa; + time_t drvt; + int first_iteration = 1; + int prev_file_displayed = -1; + CLEANUP_FREE struct follow *file = NULL; + + /* Allocate...
2016 Oct 03
1
Re: [PATCH v2 1/2] New tool: virt-tail.
.../* For each file, last mtime. */ > + int64_t size; /* For each file, last size. */ > +}; > + > +static int quit = 0; I guess this could be better as sig_atomic_t. > +static void > +user_cancel (int sig) > +{ > + quit = 1; > + ignore_value (guestfs_user_cancel (g)); > +} > + > +static int > +do_tail (int argc, char *argv[], /* list of files in the guest */ > + struct drv *drvs, struct mp *mps) > +{ > + struct sigaction sa; > + time_t drvt; > + int first_iteration = 1; > + int prev_file_displayed = -1; > + CLE...
2012 Jan 17
3
GObject bindings
This is the first iteration of the GObject bindings. I have 'kicked the tyres' on these, meaning I have ensured that a bunch of basic manual tests work as expected. I'm in the process of adding more comprehensive tests. Here's an example simple javascript program which uses these bindings: === const Guestfs = imports.gi.Guestfs; print('Starting'); var g = new
2016 Oct 03
3
[PATCH v3 0/2] New tool: virt-tail.
Since v2: - Fix the things that Pino mentioned, except the recursion. - Implement Windows support. For Windows support to be sane, I had to inline the add_and_mount code. Rich.
2017 Mar 31
6
[PATCH 0/3] Fix some quoting issues.
Fix some quoting issues by introducing Unicode quotes. Note this intentionally only affects end-user messages and documentation. Rich.
2012 Jan 20
11
[PATCH 01/10] Revert "Revert "generator: Add CamelName flag""
This reverts commit 3f6ca541c7b24d4c86688a509582cb41a7e0078c. The original commit was reverted prematurely. --- generator/generator_actions.ml | 10 +++++----- generator/generator_checks.ml | 5 +++++ generator/generator_types.ml | 3 +++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...re user cancel"); - exit (EXIT_FAILURE); - } + if (r == -1) + error (EXIT_FAILURE, errno, + "test thread: write to pipe before user cancel"); data->transfer_size += r; } @@ -259,10 +251,9 @@ start_test_thread (void *datav) guestfs_user_cancel (data->g); r = write (data->fd, buffer, sizeof buffer); - if (r == -1) { - perror ("test thread: write to pipe after user cancel"); - exit (EXIT_FAILURE); - } + if (r == -1) + error (EXIT_FAILURE, errno, + "test thread:...
2017 Feb 18
8
[PATCH 0/6] generator: Split up generator/actions.ml
Split up the huge generator/actions.ml into several smaller files. Rich.