search for: guestfs_set_event_callback

Displaying 20 results from an estimated 39 matches for "guestfs_set_event_callback".

2015 Oct 02
1
[PATCH] ruby: improve rdoc markup
...estfs.org/guestfs.3.html#guestfs_close] + * {guestfs_close}[http://libguestfs.org/guestfs.3.html#guestfs_close] * to close the libguestfs handle. */ static VALUE @@ -258,7 +258,7 @@ ruby_guestfs_close (VALUE gv) * g.set_event_callback(cb, event_bitmask) -> event_handle * * Call - * +guestfs_set_event_callback+[http://libguestfs.org/guestfs.3.html#guestfs_set_event_callback] + * {guestfs_set_event_callback}[http://libguestfs.org/guestfs.3.html#guestfs_set_event_callback] * to register an event callback. This returns an event handle. */ static VALUE @@ -297,7 +297,7 @@ ruby_set_event_callback (VALUE...
2013 Jul 17
2
Redirecting libguestfs error messages
Hi, When I register a callback for events with this function call: eh = guestfs_set_event_callback(g, message_callback, GUESTFS_EVENT_ALL, 0, dev); Shouldnt it capture and redirect messages like this to message_callback(): "libguestfs: error: lstat: /.Trash: No such file or directory" I still get them in stderr .. Thanks, Or
2011 Mar 10
1
[PATCH for discussion only] New event API (RHBZ#664558).
...e, uint64_t event, int event_handle, int flags, const char *buf, size_t buf_len, const uint64_t *array, size_t array_len); #endif #define LIBGUESTFS_HAVE_SET_EVENT_CALLBACK 1 int guestfs_set_event_callback (guestfs_h *g, guestfs_event_callback cb, uint64_t event_bitmask, int flags, void *opaque); #define LIBGUESTFS_HAVE_DELETE_EVENT_CALLBACK 1 void guestfs_delete_event_callb...
2016 Mar 19
1
[PATCH] tests/qemu: Add program for tracing and analyzing boot times.
...ata; + + assert (/* 0 <= pass && */ pass < NR_TEST_PASSES); + + data = &pass_data[pass]; + data->pass = pass; + data->nr_events = 0; + data->events = NULL; + get_time (&data->start_t); + data->incomplete_log_message = -1; + data->seen_launch = 0; + + guestfs_set_event_callback (g, close_callback, + GUESTFS_EVENT_CLOSE, 0, data); + guestfs_set_event_callback (g, subprocess_quit_callback, + GUESTFS_EVENT_SUBPROCESS_QUIT, 0, data); + guestfs_set_event_callback (g, launch_done_callback, +...
2010 Dec 22
2
Callbacks, log messages etc.
...evel (an integer). (iii) Each event can optionally have some content. For log messages this is a string with length, for progress messages it is a struct of numbers. Callers can register to receive events in a bitmask class and at a set of levels by doing: int /* event_handle */ guestfs_set_event_callback (guestfs_h *g, guestfs_event_callback cb, uint64_t event_class_bitmask, int min_level, void *opaque); void guestfs_delete_event_callback (guestfs_h *g, int event_handle); '...
2011 Dec 14
3
Proposed changes for OpenStack
[These two patches are for discussion only] Allow FUSE support to be used directly through the API. This is the second commit. In order to make this usable from guestfish, we have to also bind the events API in guestfish. This is the first commit. Rich.
2015 Jun 06
0
[PATCH 2/5] threads: Acquire and release the lock around each public guestfs_* API.
...LOCK (g); } static void default_error_cb (guestfs_h *g, void *data, const char *msg); diff --git a/src/events.c b/src/events.c index 51b9948..72a58aa 100644 --- a/src/events.c +++ b/src/events.c @@ -32,12 +32,12 @@ #include "guestfs.h" #include "guestfs-internal.h" -int -guestfs_set_event_callback (guestfs_h *g, - guestfs_event_callback cb, - uint64_t event_bitmask, - int flags, - void *opaque) +static int +unlocked_set_event_callback (guestfs_h *g, + guestf...
2013 Jul 17
0
Re: Redirecting libguestfs error messages
On Wed, Jul 17, 2013 at 04:43:34PM +0300, Or Goshen wrote: > Hi, > > When I register a callback for events with this function call: > eh = guestfs_set_event_callback(g, message_callback, GUESTFS_EVENT_ALL, 0, > dev); > > Shouldnt it capture and redirect messages like this to message_callback(): > "libguestfs: error: lstat: /.Trash: No such file or directory" > > I still get them in stderr .. Right. Error messages are handled by a...
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.
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
2013 Jul 17
1
Re: Redirecting libguestfs error messages
...nt_local_run(). What can I do then ? On Wed, Jul 17, 2013 at 5:08 PM, Richard W.M. Jones <rjones@redhat.com>wrote: > On Wed, Jul 17, 2013 at 04:43:34PM +0300, Or Goshen wrote: > > Hi, > > > > When I register a callback for events with this function call: > > eh = guestfs_set_event_callback(g, message_callback, GUESTFS_EVENT_ALL, > 0, > > dev); > > > > Shouldnt it capture and redirect messages like this to > message_callback(): > > "libguestfs: error: lstat: /.Trash: No such file or directory" > > > > I still get them in stderr .. &g...
2012 Oct 13
2
Proposed libguestfs API for implementing libvirt virConnectOpenAuth
...; } free (creds); // On return from this function (libguestfs event), the libvirt // event returns too. } // ... { guestfs_h *g; char *creds[] = { "authname", "passphrase", NULL }; g = guestfs_create (); guestfs_set_libvirt_supported_credentials (g, creds); guestfs_set_event_callback (g, do_auth, GUESTFS_EVENT_LIBVIRT_AUTH, 0, NULL); // An example of a function that would open a libvirt connection: guestfs_add_domain (g, "dom", GUESTFS_ADD_DOMAIN_LIBVIRTURI, "qemu:///system", -1); } ----------------------------------------------------...
2019 Aug 05
2
[PATCH 2/2] Rust bindings: Implement callback handlers
..._char, c_void}; +use std::slice; + +type GuestfsEventCallback = extern "C" fn( + *const base::guestfs_h, + *const c_void, + u64, + i32, + i32, + *const i8, + usize, + *const u64, + usize, +); + +#[link(name = "guestfs")] +extern "C" { + fn guestfs_set_event_callback( + g: *const base::guestfs_h, + cb: GuestfsEventCallback, + event_bitmask: u64, + flags: i32, + opaque: *const c_void, + ) -> i32; + fn guestfs_delete_event_callback(g: *const base::guestfs_h, eh: i32); + fn guestfs_event_to_string(bitmask: u64) ->...
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.
2019 Jul 30
4
[PATCH] Rust bindings: Implement Event features
...+use std::slice; +use std::sync; + +type GuestfsEventCallback = extern "C" fn( + *const base::guestfs_h, + *const c_void, + u64, + i32, + i32, + *const i8, + usize, + *const u64, + usize, +); + +#[link(name = "guestfs")] +extern "C" { + fn guestfs_set_event_callback( + g: *const base::guestfs_h, + cb: GuestfsEventCallback, + event_bitmask: u64, + flags: i32, + opaque: *const c_void, + ) -> i32; + fn guestfs_delete_event_callback(g: *const base::guestfs_h, eh: i32); + fn guestfs_event_to_string(bitmask: u64) ->...
2019 Jul 30
0
Re: [PATCH] Rust bindings: Implement Event features
...lback = extern "C" fn( >+ *const base::guestfs_h, >+ *const c_void, >+ u64, >+ i32, >+ i32, >+ *const i8, >+ usize, >+ *const u64, >+ usize, >+); >+ >+#[link(name = "guestfs")] >+extern "C" { >+ fn guestfs_set_event_callback( >+ g: *const base::guestfs_h, >+ cb: GuestfsEventCallback, >+ event_bitmask: u64, >+ flags: i32, >+ opaque: *const c_void, >+ ) -> i32; >+ fn guestfs_delete_event_callback(g: *const base::guestfs_h, eh: i32); >+ fn guestfs_even...
2016 Feb 05
7
[PATCH 0/7] lib: Stop exporting the safe_malloc, etc. functions.
The safe_malloc (etc) functions call g->abort_fn on failure. That's not appropriate for language bindings, and we never intended that these internal functions be used from language bindings, that was just a historical accident. This patch series removes any external use of the safe_* functions. Rich.
2017 Mar 03
5
[PATCH WIP 0/5] Fix virt-rescue.
This set of patches fixes virt-rescue rather cleanly. In particular the problems with handling ^C are completely fixed. Work still to be done before this can go upstream: - Shutdown doesn't work properly if you exit the shell. At the moment to exit you must do 'reboot -f'. Future improvements: - An escape sequence and escape commands that could be handled by virt-rescue,
2017 Mar 03
5
[PATCH 0/5] Fix virt-rescue.
This fixes the main issues in virt-rescue and is usable. There are some enhancements which could be made (in follow up work): - An escape sequence and escape commands that could be handled by virt-rescue, eg. to shut down the appliance, mount or unmount filesystems. - `virt-rescue -i' could be implemented cleanly by performing the right API calls before handing control to the
2015 Jun 06
7
[PATCH 0/5] Add support for thread-safe handle.
This patch isn't ready to go upstream. In fact, I think we might do a quick 1.30 release soon, and save this patch, and also the extensive changes proposed for the test suite[1], to after 1.30. Currently it is not safe to use the same handle from multiple threads, unless you implement your own mutexes. See: http://libguestfs.org/guestfs.3.html#multiple-handles-and-multiple-threads These