search for: no_handl

Displaying 20 results from an estimated 23 matches for "no_handl".

Did you mean: no_handle
2018 Feb 28
0
[PATCH] lib: Don't abort if a signal handler calls exit(2) during a guestfs_* function.
..._define_initialized (static, handles_lock); static guestfs_h *handles = NULL; @@ -323,15 +324,7 @@ guestfs_impl_parse_environment_list (guestfs_h *g, char * const *strings) void guestfs_close (guestfs_h *g) { - struct hv_param *hp, *hp_next; guestfs_h **gg; - int r; - - if (g->state == NO_HANDLE) { - /* Not safe to call ANY callbacks here, so ... */ - fprintf (stderr, _("guestfs_close: called twice on the same handle\n")); - return; - } /* Remove the handle from the handles list. */ if (g->close_on_exit) { @@ -342,6 +335,45 @@ guestfs_close (guestfs_h *g)...
2012 Apr 26
1
[PATCH 1/2] gobject: Use generator_built macro to ensure generated files are rebuilt properly.
From: "Richard W.M. Jones" <rjones at redhat.com> --- generator/generator_gobject.ml | 4 ++-- gobject/Makefile.am | 14 +++++++++----- gobject/Makefile.inc | 4 ++-- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/generator/generator_gobject.ml b/generator/generator_gobject.ml index 17c6c36..3096501 100644 ---
2013 Jan 24
2
[PATCH 1/2] lib: Add CLEANUP_FREE macro which automatically calls 'free' when leaving scope.
.../src/handle.c index 39e30c7..8cf7a40 100644 --- a/src/handle.c +++ b/src/handle.c @@ -253,6 +253,9 @@ void guestfs_close (guestfs_h *g) { struct qemu_param *qp, *qp_next; +#ifndef HAVE_ATTRIBUTE_CLEANUP + struct deferred_free *dfp, *dfp_next; +#endif guestfs_h **gg; if (g->state == NO_HANDLE) { @@ -324,6 +327,18 @@ guestfs_close (guestfs_h *g) while (g->error_cb_stack) guestfs_pop_error_handler (g); +#ifndef HAVE_ATTRIBUTE_CLEANUP + /* For compilers that don't support __attribute__((cleanup(...))), + * free any temporary data that we allocated in CLEANUP_* macros +...
2009 Sep 18
1
[PATCH] Enable new-style -chardev ... guestfwd command line
...b/src/guestfs.c @@ -86,7 +86,7 @@ static void close_handles (void); /* Also in guestfsd.c */ #define GUESTFWD_PORT 6666 -//#define GUESTFWD_ADDR "10.0.2.4" +#define GUESTFWD_ADDR "10.0.2.4" /* GuestFS handle and connection. */ enum state { CONFIG, LAUNCHING, READY, BUSY, NO_HANDLE }; @@ -983,7 +983,7 @@ guestfs__launch (guestfs_h *g) } if (r == 0) { /* Child (qemu). */ - char vmchannel[256]; + char buf[256]; char append[256]; char memsize_str[256]; @@ -1025,37 +1025,43 @@ guestfs__launch (guestfs_h *g) add_cmdline (g, "-serial");...
2016 Jan 29
0
[PATCH 6/6] launch: avoid too long paths for sockets
...uestfs_h *g) if (g->test_fp != NULL) fclose (g->test_fp); - /* Remove temporary directory. */ + /* Remove temporary directories. */ guestfs_int_remove_tmpdir (g); + guestfs_int_remove_sockdir (g); /* Mark the handle as dead and then free up all memory. */ g->state = NO_HANDLE; @@ -380,6 +381,7 @@ guestfs_close (guestfs_h *g) free (g->env_tmpdir); free (g->int_tmpdir); free (g->int_cachedir); + free (g->sockdir); free (g->last_error); free (g->identifier); free (g->program); diff --git a/src/launch-direct.c b/src/launch-direct.c i...
2012 Jul 03
8
[PATCH 0/7 v2] Fix and workaround for qcow2 issues in qemu causing data corruption.
https://bugzilla.redhat.com/show_bug.cgi?id=836710 https://bugzilla.redhat.com/show_bug.cgi?id=836913 There are at least two related bugs going on: (1) Linux sync(2) system call doesn't send a write barrier to the disk, so in effect it doesn't force the hard disk to flush its cache. libguestfs used sync(2) to force changes to disk. We didn't expect that qemu was caching anything
2016 Feb 02
0
[PATCH 3/3] New API: get-sockdir
...uestfs_h *g) if (g->test_fp != NULL) fclose (g->test_fp); - /* Remove temporary directory. */ + /* Remove temporary directories. */ guestfs_int_remove_tmpdir (g); + guestfs_int_remove_sockdir (g); /* Mark the handle as dead and then free up all memory. */ g->state = NO_HANDLE; @@ -377,7 +382,9 @@ guestfs_close (guestfs_h *g) if (g->pda) hash_free (g->pda); free (g->tmpdir); + free (g->sockdir); free (g->env_tmpdir); + free (g->env_runtimedir); free (g->int_tmpdir); free (g->int_cachedir); free (g->last_error); diff --...
2016 Feb 03
0
[PATCH v2 2/2] New API: get-sockdir
...uestfs_h *g) if (g->test_fp != NULL) fclose (g->test_fp); - /* Remove temporary directory. */ + /* Remove temporary directories. */ guestfs_int_remove_tmpdir (g); + guestfs_int_remove_sockdir (g); /* Mark the handle as dead and then free up all memory. */ g->state = NO_HANDLE; @@ -377,7 +382,9 @@ guestfs_close (guestfs_h *g) if (g->pda) hash_free (g->pda); free (g->tmpdir); + free (g->sockdir); free (g->env_tmpdir); + free (g->env_runtimedir); free (g->int_tmpdir); free (g->int_cachedir); free (g->last_error); diff --...
2016 Jan 29
7
[PATCH 1/6] launch: unix: check for length of sockets
Error out early if the path to the socket will not fit into sockaddr_un::sun_path, as we will not be able to connect to it. --- src/launch-unix.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/launch-unix.c b/src/launch-unix.c index 740c554..973e14b 100644 --- a/src/launch-unix.c +++ b/src/launch-unix.c @@ -47,6 +47,12 @@ launch_unix (guestfs_h *g, void *datav, const char
2016 Feb 03
4
[PATCH v2 1/2] launch: add internal helper for socket paths creation
Introduce an internal helper to create paths for sockets -- will be useful for changing later the logic for placing sockets. Futhermore, check that the length of sockets won't overflow the buffer for their filenames. --- src/guestfs-internal.h | 1 + src/launch-direct.c | 4 +++- src/launch-libvirt.c | 10 ++++++---- src/launch.c | 17 +++++++++++++++++ 4 files changed, 27
2016 Feb 02
6
[PATCH 1/3] launch: add internal helper for socket paths creation
Introduce an internal helper to create paths for sockets; will be useful for changing later the logic for placing sockets. --- src/guestfs-internal.h | 1 + src/launch-direct.c | 4 +++- src/launch-libvirt.c | 10 ++++++---- src/launch.c | 15 +++++++++++++++ 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index
2016 Jan 29
1
Re: [PATCH 6/6] launch: avoid too long paths for sockets
...t; fclose (g->test_fp); > > - /* Remove temporary directory. */ > + /* Remove temporary directories. */ > guestfs_int_remove_tmpdir (g); > + guestfs_int_remove_sockdir (g); > > /* Mark the handle as dead and then free up all memory. */ > g->state = NO_HANDLE; > @@ -380,6 +381,7 @@ guestfs_close (guestfs_h *g) > free (g->env_tmpdir); > free (g->int_tmpdir); > free (g->int_cachedir); > + free (g->sockdir); > free (g->last_error); > free (g->identifier); > free (g->program); > diff --git...
2015 Jun 06
0
[PATCH 2/5] threads: Acquire and release the lock around each public guestfs_* API.
.../ bool verbose; /* Debugging. */ diff --git a/src/handle.c b/src/handle.c index a057475..dfb8817 100644 --- a/src/handle.c +++ b/src/handle.c @@ -316,6 +316,7 @@ guestfs_close (guestfs_h *g) { struct hv_param *hp, *hp_next; guestfs_h **gg; + int r; if (g->state == NO_HANDLE) { /* Not safe to call ANY callbacks here, so ... */ @@ -392,7 +393,24 @@ guestfs_close (guestfs_h *g) free (g->backend_data); guestfs_int_free_string_list (g->backend_settings); free (g->append); - gl_recursive_lock_destroy (g->lock); + r = glthread_recursive_lock_dest...
2009 Aug 18
8
src/ is now warning-free, too
These patches first make src/ warning free, and then turn on the strict warning options. 75 0001-build-suppress-an-ignored-write-return-value-warning.patch 38 0002-build-suppress-an-ignored-dup-return-value-warning.patch 27 0003-generator.ml-suppress-signed-unsigned-compare-warnin.patch 48 0004-build-don-t-perform-arithmetic-on-void-pointers.patch 30
2018 Mar 01
7
[PATCH v3 0/6] v2v: Add -o rhv-upload output mode.
v2 -> v3: - Lots of code cleanups. - Documentation. However this is still spooling the file into a temporary before the upload. It turns out that fixing this is going to require a small change to qemu. Rich.
2015 Jun 16
5
[PATCH threads v2 0/5] Add support for thread-safe handle.
Previous discussion here: https://www.redhat.com/archives/libguestfs/2015-June/thread.html#00048 v2: - Use a cleanup handler to release the lock. - Rebase to upstream. Note I have not fixed the problem(s) with error handling (patch 3).
2010 Jul 05
5
[PATCH 0/3] RFC: Allow use of external QEMU process with libguestfs
This attempts to implement the idea proposed in https://www.redhat.com/archives/libguestfs/2010-April/msg00087.html The idea is that an externally managed QEMU (manual, or via libvirt) can boot the appliance kernel/initrd. libguestfs can then be just told of the UNIX domain socket associated with the guest daemon. An example based on guestfish. 1. Step one, find the appliance kernel/initrd
2017 Jun 27
9
[PATCH v3 0/5] threads: Add support for thread-safe handle.
Previously posted in 2015: v1: https://www.redhat.com/archives/libguestfs/2015-June/msg00048.html v2: https://www.redhat.com/archives/libguestfs/2015-June/msg00118.html I have rebased and tidied up the patches, fixing a few spelling mistakes, but they are broadly the same as before. I also ran all the tests, which pass. As with the previous versions, this makes a change to the API, where you
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
2011 Mar 10
1
[PATCH for discussion only] New event API (RHBZ#664558).
...GUESTFS_EVENT_PROGRESS, + opaque, cb); +} diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index 0eb395b..b4f7f6a 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -87,6 +87,18 @@ enum state { CONFIG, LAUNCHING, READY, BUSY, NO_HANDLE }; /* Attach method. */ enum attach_method { ATTACH_METHOD_APPLIANCE = 0, ATTACH_METHOD_UNIX }; +/* Event. */ +struct event { + uint64_t event_bitmask; + guestfs_event_callback cb; + void *opaque; + + /* opaque2 is not exposed through the API, but is used internally to + * emulate the ol...