search for: check_for_error

Displaying 20 results from an estimated 48 matches for "check_for_error".

Did you mean: check_for_errors
2016 Jan 19
2
[PATCH libguestfs v3] lib: Handle slow USB devices more gracefully.
...l.h> #include <grp.h> +#include <errno.h> #include <sys/types.h> #include <sys/stat.h> #include <assert.h> @@ -2015,6 +2016,8 @@ ignore_errors (void *ignore, virErrorPtr ignore2) /* empty */ } +static int destroy_domain (guestfs_h *g, virDomainPtr dom, int check_for_errors); + static int shutdown_libvirt (guestfs_h *g, void *datav, int check_for_errors) { @@ -2023,23 +2026,14 @@ shutdown_libvirt (guestfs_h *g, void *datav, int check_for_errors) virDomainPtr dom = data->dom; size_t i; int ret = 0; - int flags; /* Note that we can be called back v...
2016 Jan 19
1
Re: [PATCH libguestfs v3] lib: Handle slow USB devices more gracefully.
...t;sys/types.h> > > #include <sys/stat.h> > > #include <assert.h> > > @@ -2015,6 +2016,8 @@ ignore_errors (void *ignore, virErrorPtr ignore2) > > /* empty */ > > } > > > > +static int destroy_domain (guestfs_h *g, virDomainPtr dom, int check_for_errors); > > + > > static int > > shutdown_libvirt (guestfs_h *g, void *datav, int check_for_errors) > > { > > @@ -2023,23 +2026,14 @@ shutdown_libvirt (guestfs_h *g, void *datav, int check_for_errors) > > virDomainPtr dom = data->dom; > > size_t i; &...
2016 Jan 19
0
Re: [PATCH libguestfs v3] lib: Handle slow USB devices more gracefully.
...e <errno.h> > #include <sys/types.h> > #include <sys/stat.h> > #include <assert.h> > @@ -2015,6 +2016,8 @@ ignore_errors (void *ignore, virErrorPtr ignore2) > /* empty */ > } > > +static int destroy_domain (guestfs_h *g, virDomainPtr dom, int check_for_errors); > + > static int > shutdown_libvirt (guestfs_h *g, void *datav, int check_for_errors) > { > @@ -2023,23 +2026,14 @@ shutdown_libvirt (guestfs_h *g, void *datav, int check_for_errors) > virDomainPtr dom = data->dom; > size_t i; > int ret = 0; > - int fla...
2016 Apr 14
0
[PATCH] Add safe wrapper around waitpid which deals with EINTR correctly.
...aitpid_noerror (data->pid); + if (data->recoverypid > 0) guestfs_int_waitpid_noerror (data->recoverypid); data->pid = 0; data->recoverypid = 0; memset (&g->launch_t, 0, sizeof g->launch_t); @@ -1484,16 +1483,14 @@ shutdown_direct (guestfs_h *g, void *datav, int check_for_errors) /* Wait for subprocess(es) to exit. */ if (g->recovery_proc /* RHBZ#998482 */ && data->pid > 0) { - if (waitpid (data->pid, &status, 0) == -1) { - perrorf (g, "waitpid (qemu)"); + if (guestfs_int_waitpid (g, data->pid, &status, "qem...
2018 Feb 28
0
[PATCH] lib: Don't abort if a signal handler calls exit(2) during a guestfs_* function.
...| 75 +++++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 51 insertions(+), 24 deletions(-) diff --git a/lib/handle.c b/lib/handle.c index 449ab42a6..19caad813 100644 --- a/lib/handle.c +++ b/lib/handle.c @@ -43,6 +43,7 @@ static int shutdown_backend (guestfs_h *g, int check_for_errors); static void close_handles (void); +static void do_close (guestfs_h *g, int ignore_recursive); gl_lock_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_cl...
2016 Apr 14
2
[PATCH] Add safe wrapper around waitpid which deals with EINTR correctly.
As Eric Blake noted in: https://www.redhat.com/archives/libguestfs/2016-April/msg00154.html libguestfs doesn't correctly handle the case where waitpid receives a SIGCHLD signal and the main program has registered a non-restartable signal handler. In this case waitpid would return -EINTR and we would print an error, but actually we should retry this case. This adds two new internal functions,
2015 Nov 05
0
[PATCH 2/2] actions: refactor available & feature_available
...res. */ + struct cached_feature *features; + size_t nr_features; }; /* Per-filesystem data stored for inspect_os. */ diff --git a/src/handle.c b/src/handle.c index bd66717..f7b0909 100644 --- a/src/handle.c +++ b/src/handle.c @@ -422,6 +422,7 @@ static int shutdown_backend (guestfs_h *g, int check_for_errors) { int ret = 0; + size_t i; if (g->state == CONFIG) return 0; @@ -444,6 +445,12 @@ shutdown_backend (guestfs_h *g, int check_for_errors) guestfs_int_free_drives (g); + for (i = 0; i < g->nr_features; ++i) + free (g->features[i].group); + free (g->features)...
2013 Mar 07
4
[PATCH 0/4] Small refactorings of the protocol layer.
As the start of work to add remote support, I'm taking a close look at the protocol layer in the library. These are some small cleanups. Rich.
2014 Oct 31
1
[PATCH] launch: libvirt: Implement drive secrets (RHBZ#1159016).
...type = "iscsi"; + break; + default: + *type = "volume"; /* ? */ + } + + return 1; + } + } + + return 0; +} + +static int is_blk (const char *path) { struct stat statbuf; @@ -1678,6 +1888,7 @@ shutdown_libvirt (guestfs_h *g, void *datav, int check_for_errors) struct backend_libvirt_data *data = datav; virConnectPtr conn = data->conn; virDomainPtr dom = data->dom; + size_t i; int ret = 0; int flags; @@ -1710,6 +1921,12 @@ shutdown_libvirt (guestfs_h *g, void *datav, int check_for_errors) free (data->network_bridge); dat...
2014 Oct 31
1
[PATCH v2] launch: libvirt: Implement drive secrets (RHBZ#1159016).
Since v1: - Base64 decode the Ceph secret before passing it to libvirt. - Don't call virSecretFree (NULL) [libvirt bug?] - Small cleanups.
2016 Jan 29
0
[PATCH 5/6] launch: libvirt: cleanup sockets on shutdown
...ole_path, sizeof data->console_path, "%s/console.sock", g->tmpdir); - unlink (data->console_path); console_sock = socket (AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0); if (console_sock == -1) { @@ -2027,6 +2025,16 @@ shutdown_libvirt (guestfs_h *g, void *datav, int check_for_errors) if (conn != NULL) virConnectClose (conn); + if (data->guestfsd_path[0] != '\0') { + unlink (data->guestfsd_path); + data->guestfsd_path[0] = '\0'; + } + + if (data->console_path[0] != '\0') { + unlink (data->console_path); + data-&gt...
2018 Dec 06
1
[PATCH] Revert "launch: libvirt: Use qemu-bridge-helper to implement
Possibly for post 1.40. Rich.
2016 Mar 22
0
[PATCH v3 07/11] launch: direct: Don't run qemu -version.
...ebug (g, "%s: failed to parse qemu version string from the first line of the output of '%s -help'. When reporting this bug please include the -help output.", + __func__, g->hv); return; } @@ -1508,8 +1494,6 @@ shutdown_direct (guestfs_h *g, void *datav, int check_for_errors) free (data->qemu_help); data->qemu_help = NULL; - free (data->qemu_version); - data->qemu_version = NULL; free (data->qemu_devices); data->qemu_devices = NULL; -- 2.7.4
2015 Jan 21
0
[PATCH] aarch64: appliance: Use AAVMF (UEFI) if available for running the appliance.
...vars) { + start_element ("nvram") { + string (params->data->uefi_vars); + } end_element (); + } + } + start_element ("kernel") { string (params->kernel); } end_element (); @@ -1984,6 +2004,11 @@ shutdown_libvirt (guestfs_h *g, void *datav, int check_for_errors) data->secrets = NULL; data->nr_secrets = 0; + free (data->uefi_code); + data->uefi_code = NULL; + free (data->uefi_vars); + data->uefi_vars = NULL; + return ret; } -- 1.8.3.1
2019 May 24
3
[PATCH 0/2] libvirt: fix check of custom QEMU
In case you configure libguestfs with a custom QEMU, e.g.: $ ./configure [...] QEMU=/path/to/qemu then the libvirt backend did not use to override it, launching the appliance with the default QEMU for libvirt. This does not change the manual emulator overriding using set-hv. Pino Toscano (2): launch: libvirt: get default QEMU from domcapabilities launch: libvirt: fix custom hypervisor
2018 Dec 06
0
[PATCH v2] Revert "launch: libvirt: Use qemu-bridge-helper to implement a full network (RHBZ#1148012)."
...eed to allow the bridge in /etc/qemu/bridge.conf.\n" - "For further information see guestfs(3)."), - brname); - return -1; -} - static void ignore_errors (void *ignore, virErrorPtr ignore2) { @@ -2017,9 +1971,6 @@ shutdown_libvirt (guestfs_h *g, void *datav, int check_for_errors) free (data->selinux_imagelabel); data->selinux_imagelabel = NULL; - free (data->network_bridge); - data->network_bridge = NULL; - for (i = 0; i < data->nr_secrets; ++i) free (data->secrets[i].secret); free (data->secrets); -- 2.19.0.rc0
2015 Nov 05
4
[PATCH 1/2] actions: turn available & feature_available as non-daemon
Rename the current available and feature_available into internal daemon functions, and provide non-daemon functions wrapping them at library side. This will make it possible to e.g. add caching for them. Should be only refactoring, no actual behaviour change. --- daemon/available.c | 4 +- generator/actions.ml | 192 ++++++++++++++++++++++++++++----------------------- po/POTFILES |
2018 Dec 06
2
[PATCH v2] Revert "launch: libvirt: Use qemu-bridge-helper to implement a full network (RHBZ#1148012)."
Let's actually compile and test the patch this time, rather than trusting the RHEL 7.6 patch to apply directly to head ... Rich.
2014 Oct 02
5
[PATCH v3 0/4] launch: libvirt: Use qemu-bridge-helper to implement a
v3: - Various changes to dhclient/dhcpcd as discussed on the mailing list.
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