Displaying 20 results from an estimated 101 matches for "event_handler".
2006 Oct 31
0
6317254 missing lock_dev()/unlock_dev() in devfsadm event_handler()
Author: cth
Repository: /hg/zfs-crypto/gate
Revision: 855003e47284a1376b3ce65d9f3629b60711fed8
Log message:
6317254 missing lock_dev()/unlock_dev() in devfsadm event_handler()
Files:
update: usr/src/cmd/devfsadm/devfsadm.c
2011 Mar 10
1
[PATCH for discussion only] New event API (RHBZ#664558).
It's not too clear from the patch, so I have also extracted the new
API from <guestfs.h> and the relevant section of the man page.
Rich.
----------------------------------------------------------------------
/* Events. */
#define GUESTFS_EVENT_CLOSE 0x0001
#define GUESTFS_EVENT_SUBPROCESS_QUIT 0x0002
#define GUESTFS_EVENT_LAUNCH_DONE 0x0004
#define
2015 Oct 06
6
[PATCH 0/4] ocaml: Allow Guestfs.t handle to be garbage collected.
Allow Guestfs.t handle to be garbage collected, and add a
regression test.
2015 Jun 06
0
[PATCH 2/5] threads: Acquire and release the lock around each public guestfs_* API.
Since each ACQUIRE_LOCK/RELEASE_LOCK call must balance, this code is
difficult to debug. Enable DEBUG_LOCK to add some prints which can
help.
The only definitive list of public APIs is found indirectly in the
generator (in generator/c.ml : globals).
---
generator/c.ml | 18 ++++++++++++++
src/errors.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++----
src/events.c
2023 Feb 13
3
Issue with downloading files whose path contains multi-byte utf-8 characters
On Sun, Feb 12, 2023 at 03:31:08PM +0200, Yonatan Shtarkman wrote:
> Hey,
> When downloading a file whose path contains multi-byte utf-8, libguestfs
> sometimes crashes.
> This reproduces when using python, and not when using guestfish.
>
> Code to reproduce:
> for i in range(2000):
> ? ? g.download ('/xxx?', '/tmp/1')
'i' is not used inside the
2023 Feb 12
1
Issue with downloading files whose path contains multi-byte utf-8 characters
Hey,
When downloading a file whose path contains multi-byte utf-8, libguestfs
sometimes crashes.
This reproduces when using python, and not when using guestfish.
Code to reproduce:
for i in range(2000):
g.download ('/xxx?', '/tmp/1')
#0 raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff7fac140 in <signal handler called> () at
2015 Oct 02
1
[PATCH] ruby: improve rdoc markup
- fix the syntax of hyperlinks
- replace the deprecation text with a simplier named list item, so it's
more visible
- use a named list item for the pointer to the C documentation of each
API
- add a named list item for the version of each API
---
generator/ruby.ml | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/generator/ruby.ml
2023 Feb 14
2
[PATCH 1/2] python: Avoid crash if callback parameters cannot be built
In the case that building the parameters to the Python event callback
fails, args was returned as NULL. We immediately tried to call
Py_INCREF on this which crashed. Returning NULL means the Python
function threw an exception, so print the exception and return (there
is no way to return an error here - the event is lost).
Reported-by: Yonatan Shtarkman
See:
2023 Apr 03
0
[Patch v3] vdpa/mlx5: Avoid losing link state updates
...; +
> >> + wqent->mvdev = &ndev->mvdev;
> >> + INIT_WORK(&wqent->work, update_carrier);
> >> + queue_work(ndev->mvdev.wq, &wqent->work);
> >> + return 0;
> >> +}
> >> +
> >> +static int event_handler(struct notifier_block *nb, unsigned long event, void *param)
> >> +{
> >> + struct mlx5_vdpa_net *ndev = container_of(nb, struct mlx5_vdpa_net, nb);
> >> + struct mlx5_eqe *eqe = param;
> >> + int ret = NOTIFY_DONE;
> >> +
> >>...
2010 Dec 22
2
Callbacks, log messages etc.
Inspired by but not completely related to:
https://bugzilla.redhat.com/show_bug.cgi?id=664558
"RFE: Allow to set log callback in Ruby bindings"
How can we make callbacks useful?
First off what are we talking about? There are several callbacks that
can be registered through the C API:
(a) error callback
http://libguestfs.org/guestfs.3.html#guestfs_set_error_handler
(b) out
2023 Feb 14
2
[PATCH 2/2] python: Use bytes instead of str for event callback buffer
The event callback gets a buffer parameter which is usually something
like a log message. However as it comes from C it is not necessarily
well-formed (eg) UTF-8 but could contain any old byte sequence.
In the test case provided by the reported, we failed to encode the
buffer as str with this error:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 137: unexpected
2015 Sep 30
0
[PATCH 2/2] ocaml: Improve ocamldoc.
Miscellaneous improvements to the ocamldoc:
- Generate more sub-headings.
- Document the object-oriented API.
- Use a common function to generate the doc for module and OO APIs.
---
generator/ocaml.ml | 84 +++++++++++++++++++++++++++++++-----------------------
1 file changed, 49 insertions(+), 35 deletions(-)
diff --git a/generator/ocaml.ml b/generator/ocaml.ml
index 465df3c..2be3b7e
2023 Jun 27
1
[PATCH libguestfs 1/4] ocaml: Replace old enter/leave_blocking_section calls
Since OCaml 4 the old and confusing caml_enter_blocking_section and
caml_leave_blocking_section calls have been replaced with
caml_release_runtime_system and caml_acquire_runtime_system (in that
order). Use the new names.
---
generator/OCaml.ml | 5 +++--
ocaml/guestfs-c.c | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/generator/OCaml.ml b/generator/OCaml.ml
index
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
2004 Aug 06
1
ices: Metadata for im_stdinpcm
...+static void close_module(input_module_t *mod)
+{
+ if(mod)
+ {
+ if(mod->internal)
+ {
+ stdinpcm_state *s = mod->internal;
+ thread_mutex_destroy(&s->metadatalock);
+ free(s);
+ }
+ free(mod);
+ }
+}
+
static int event_handler(input_module_t *mod, enum event_type ev, void *param)
{
+ stdinpcm_state *s = mod->internal;
+
switch(ev)
{
case EVENT_SHUTDOWN:
@@ -50,6 +67,20 @@
case EVENT_NEXTTRACK:
((stdinpcm_state *)mod->internal)->newtrack = 1;
break;
+...
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,
2023 Jun 27
4
[PATCH libguestfs 0/4] Fix ups for OCaml 5
No action required here as I have pushed this already, this is
just for your information.
Rich.
2015 Sep 30
3
[PATCH 1/2] ocaml: Use ocamlfind to run ocamldoc.
Using 'ocamlfind ocamldoc' is much faster than running 'ocamldoc'
directly, because ocamlfind will run the native code program
'ocamldoc.opt' if it is available.
This change approximately halves the time taken to compile the ocaml
bindings.
---
ocaml/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
index
2019 Jul 30
0
Re: [PATCH] Rust bindings: Implement Event features
On Tue, Jul 30, 2019 at 02:51:37PM +0900, Hiroyuki Katsura wrote:
>This patch includes:
>
>- Event callback handlers
>- Tests related to events(410-430)
>---
> generator/rust.ml | 38 ++++++-
> rust/src/base.rs | 24 +++--
> rust/src/error.rs | 8 +-
> rust/src/event.rs | 158
2013 Dec 27
0
[PATCH] ruby: Fix .new method (RHBZ#1046509).
The .new method was unintentionally broken in
commit 9466060201600db47016133d80af22eb38091a49.
This fixes the .new method and allows it to be called with multiple
parameters, so you can use:
Guestfs::Guestfs.new
Guestfs::Guestfs.new()
Guestfs::Guestfs.new(:close_on_exit => false)
etc.
For backwards compatibility, Guestfs::create may still be used.
This commit also adds regression