search for: event_bitmask

Displaying 16 results from an estimated 16 matches for "event_bitmask".

2011 Mar 10
1
[PATCH for discussion only] New event API (RHBZ#664558).
...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_callback (guestfs_h *g, int event_handle); ---------------------------------------------------------------------- SETTING CALLBAC...
2015 Jun 06
0
[PATCH 2/5] threads: Acquire and release the lock around each public guestfs_* API.
...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, + guestfs_event_callback cb, + uint64_t event_bitmask, + int flags, +...
2019 Jul 30
0
Re: [PATCH] Rust bindings: Implement Event features
...t;+ 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) -> *const c_char; >+ fn free(buf: *const c_void); >+} >+ >+#[de...
2019 Jul 30
4
[PATCH] Rust bindings: Implement Event features
...uestfs_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) -> *const c_char; + fn free(buf: *const c_void); +} + +#[derive(Hash, PartialEq, Eq)] +pub stru...
2015 Oct 02
1
[PATCH] ruby: improve rdoc markup
...t; nil * * Call - * +guestfs_close+[http://libguestfs.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. */...
2019 Aug 05
2
[PATCH 2/2] Rust bindings: Implement callback handlers
...uestfs_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) -> *const c_char; + fn free(buf: *const c_void); +} + #[derive(Hash, PartialEq, Eq)] pub stru...
2019 Jul 30
1
Re: [PATCH] Rust bindings: Implement Event features
...t; >+ *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) -> *const c_char; > >+ fn free(buf: *const c...
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
2019 Aug 05
3
Re: [PATCH] Rust bindings: Implement Event features
I fixed based on comments. I'll send these two patches to this mailing list. - Fix Handle -> Handle<'a> - Add events Regards, Hiroyuki 2019年8月1日(木) 0:01 Pino Toscano <ptoscano@redhat.com>: > Hi Hiroyuki, > > On Tuesday, 30 July 2019 07:51:37 CEST Hiroyuki Katsura wrote: > > This patch includes: > > > > - Event callback handlers > > -
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
2018 Jan 22
2
[PATCH] lua, perl: Use thread-safe strerror_r instead of strerror (RHBZ#1536763).
..._string_list: malloc failed: %%s\", err); /*NOTREACHED*/ return NULL; } diff --git a/generator/perl.ml b/generator/perl.ml index bd7e328cd..240bf3b54 100644 --- a/generator/perl.ml +++ b/generator/perl.ml @@ -308,7 +308,7 @@ PREINIT: CODE: str = guestfs_event_to_string (event_bitmask); if (str == NULL) - croak (\"%%s\", strerror (errno)); + croak (\"%%m\"); RETVAL = newSVpv (str, 0); free (str); OUTPUT: diff --git a/lua/Makefile.am b/lua/Makefile.am index f90c1d7cb..a26c0baee 100644 --- a/lua/Makefile.am +++ b/lua/Makefil...
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.
2016 May 04
9
[PATCH 0/8] python: PEP 8 fixes
Hi, this series cleans up the Python sources, either static or generated, including also tests, to make them PEP 8 compliant; see https://www.python.org/dev/peps/pep-0008/ and tools like pep8. Almost all the issues reported by pep8 are fixed, reducing the issues from 3818 to 7. The changes should have no effect on the actual code, while it will help Python users with consistency with other
2012 Oct 13
0
[PATCH] New APIs: Model libvirt authentication events through the API.
...0; + +error: + for (i = 0; i < ncred; ++i) { + free (cred[i].result); + cred[i].result = NULL; + cred[i].resultlen = 0; + } + return -1; +} + +static int +exists_libvirt_auth_event (guestfs_h *g) +{ + size_t i; + + for (i = 0; i < g->nr_events; ++i) + if ((g->events[i].event_bitmask & GUESTFS_EVENT_LIBVIRT_AUTH) != 0) + return 1; + + return 0; +} + +/* Open a libvirt connection (called from other parts of the library). */ +virConnectPtr +guestfs___open_libvirt_connection (guestfs_h *g, const char *uri, + unsigned int flags) +{ + vir...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...0349c55..8660fc4 100644 --- a/fish/events.c +++ b/fish/events.c @@ -27,6 +27,8 @@ #include <assert.h> #include <sys/types.h> #include <sys/wait.h> +#include <errno.h> +#include <error.h> #include <guestfs.h> @@ -261,10 +263,8 @@ print_event_set (uint64_t event_bitmask, FILE *fp) fputs ("*", fp); else { CLEANUP_FREE char *str = guestfs_event_to_string (event_bitmask); - if (!str) { - perror ("guestfs_event_to_string"); - exit (EXIT_FAILURE); - } + if (!str) + error (EXIT_FAILURE, errno, "guestfs_event_...
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.