search for: daemon_accept_sock

Displaying 17 results from an estimated 17 matches for "daemon_accept_sock".

2013 Mar 07
3
[PATCH 0/3] protocol: Abstract out socket operations.
I've been taking a long hard look at the protocol layer. It has evolved over a long time without any particular direction, and the result is, to say the least, not very organized. These patches take a first step at cleaning up the mess by abstracting out socket operations from the rest of the code. The purpose of this is to allow us to slot in a different connection layer under the
2014 Feb 13
3
Libguestfs (1.22.6) driver/changes for mingw/win32
Hi, I attached the changes I made to a vanilla libguestfs-1.22.6 in order to make it work in mingw/win32. Added is also the patch required to make QEMU compatible (add a command to QMP that lists the supported devices (the regilat way you do it print it to stderr, which is difficult to redirect in win32)). This is done on behalf of Intel Corp. Thanks, Or (oberon in irc)
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
2017 Mar 03
2
[PATCH 1/2] Use gnulib set_nonblocking_flag function instead of fcntl.
...perrorf (g, "accept_connection: fcntl"); + if (set_nonblocking_flag (conn->daemon_sock, 1) == -1) { + perrorf (g, "accept_connection: set_nonblocking_flag"); return -1; } @@ -438,14 +439,14 @@ guestfs_int_new_conn_socket_listening (guestfs_h *g, assert (daemon_accept_sock >= 0); - if (fcntl (daemon_accept_sock, F_SETFL, O_NONBLOCK) == -1) { - perrorf (g, "new_conn_socket_listening: fcntl"); + if (set_nonblocking_flag (daemon_accept_sock, 1) == -1) { + perrorf (g, "new_conn_socket_listening: set_nonblocking_flag"); return NULL;...
2016 Feb 02
0
Re: [PATCH 1/3] launch: add internal helper for socket paths creation
...printf (data->guestfsd_sock, sizeof data->guestfsd_sock, "%s/guestfsd.sock", g->tmpdir); > + if (guestfs_int_create_socketname (g, "guestfsd.sock", > + &data->guestfsd_sock) == -1) > + goto cleanup0; > > daemon_accept_sock = socket (AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0); > if (daemon_accept_sock == -1) { > diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c > index 8a5d93e..376bd80 100644 > --- a/src/launch-libvirt.c > +++ b/src/launch-libvirt.c > @@ -395,8 +395,9 @@ launch_libvirt (guestfs_...
2016 Jan 29
0
[PATCH 6/6] launch: avoid too long paths for sockets
...connect to. */ - snprintf (data->guestfsd_sock, sizeof data->guestfsd_sock, "%s/guestfsd.sock", g->tmpdir); + if (guestfs_int_create_socketname (g, "guestfsd.sock", + &data->guestfsd_sock) == -1) + goto cleanup0; daemon_accept_sock = socket (AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0); if (daemon_accept_sock == -1) { diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c index 8a5d93e..376bd80 100644 --- a/src/launch-libvirt.c +++ b/src/launch-libvirt.c @@ -395,8 +395,9 @@ launch_libvirt (guestfs_h *g, void *datav, const char...
2016 Feb 03
4
[PATCH v2 1/2] launch: add internal helper for socket paths creation
...connect to. */ - snprintf (data->guestfsd_sock, sizeof data->guestfsd_sock, "%s/guestfsd.sock", g->tmpdir); + if (guestfs_int_create_socketname (g, "guestfsd.sock", + &data->guestfsd_sock) == -1) + goto cleanup0; daemon_accept_sock = socket (AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0); if (daemon_accept_sock == -1) { diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c index 8a5d93e..376bd80 100644 --- a/src/launch-libvirt.c +++ b/src/launch-libvirt.c @@ -395,8 +395,9 @@ launch_libvirt (guestfs_h *g, void *datav, const char...
2016 Feb 02
6
[PATCH 1/3] launch: add internal helper for socket paths creation
...connect to. */ - snprintf (data->guestfsd_sock, sizeof data->guestfsd_sock, "%s/guestfsd.sock", g->tmpdir); + if (guestfs_int_create_socketname (g, "guestfsd.sock", + &data->guestfsd_sock) == -1) + goto cleanup0; daemon_accept_sock = socket (AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0); if (daemon_accept_sock == -1) { diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c index 8a5d93e..376bd80 100644 --- a/src/launch-libvirt.c +++ b/src/launch-libvirt.c @@ -395,8 +395,9 @@ launch_libvirt (guestfs_h *g, void *datav, const char...
2016 Jan 29
1
Re: [PATCH 6/6] launch: avoid too long paths for sockets
...printf (data->guestfsd_sock, sizeof data->guestfsd_sock, "%s/guestfsd.sock", g->tmpdir); > + if (guestfs_int_create_socketname (g, "guestfsd.sock", > + &data->guestfsd_sock) == -1) > + goto cleanup0; > > daemon_accept_sock = socket (AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0); > if (daemon_accept_sock == -1) { > diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c > index 8a5d93e..376bd80 100644 > --- a/src/launch-libvirt.c > +++ b/src/launch-libvirt.c > @@ -395,8 +395,9 @@ launch_libvirt (guestfs_...
2014 Mar 27
3
[PATCH 0/2] launch: libvirt: Use libvirt to set up the user network.
Use libvirt to set up the user network instead of a custom qemu argument. Note this requires a non-upstream patch being discussed on the libvirt mailing list at the moment. https://bugzilla.redhat.com/show_bug.cgi?id=1075520#c6 Rich.
2014 Nov 04
13
[PATCH 0/9] Small bits of non-Linux porting - #2
Hi, continuing what started a couple of weeks ago [1], the attached patch series continues the work in making it easier to build and run libguestfs (in fixed appliance mode) on OSes different than Linux. The provided changes should cause no functional changes on Linux. [1] https://www.redhat.com/archives/libguestfs/2014-October/msg00176.html Thanks, -- Pino Pino Toscano (9): build: check
2017 Apr 27
4
[PATCH 0/4] common: Add a simple mini-library for handling qemu command and config files.
Currently we have an OCaml library for generating the qemu command line (used only by ‘virt-v2v -o qemu’). However we also generate a qemu command line in ‘lib/launch-direct.c’, and we might in future need to generate a ‘-readconfig’-compatible configuration file if we want to go beyond 10,000 drives for scalability testing. Therefore this patch series reimplements the qemu command line code as
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.
2016 May 18
2
[PATCH v2 0/2] lib: qemu: Memoize qemu feature detection.
v1 -> v2: - Rebase on top of Pino's version work. Two patches went upstream, these are the two remaining patches. Note the generation number is still inside the qemu.stat file. We could put it in the filename, I have no particular preference. Rich.
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...it a/src/conn-socket.c b/src/conn-socket.c index 252b942..a935cc4 100644 --- a/src/conn-socket.c +++ b/src/conn-socket.c @@ -380,8 +380,8 @@ static struct connection_ops ops = { */ struct connection * guestfs_int_new_conn_socket_listening (guestfs_h *g, - int daemon_accept_sock, - int console_sock) + int daemon_accept_sock, + int console_sock) { struct connection_socket *conn; @@ -419,8 +419,8 @@ guestfs_int_new_conn_socket_listening (guestfs_h *g, */ struct connection * guestfs_int_new_conn_socket_connecte...
2016 May 12
7
[PATCH 0/4] lib: qemu: Memoize qemu feature detection.
Doing qemu feature detection in the direct backend takes ~100ms because we need to run `qemu -help' and `qemu -devices ?', and each of those interacts with glibc's very slow link loader. Fixing the link loader is really hard. Instead memoize the output of those two commands. This patch series first separates all the code dealing with qemu into a separate module (src/qemu.c) and
2015 Oct 05
3
[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste. --- align/scan.c | 35 ++++++++++--------- cat/cat.c | 39 +++++++++++---------- cat/filesystems.c | 69 +++++++++++++++++++------------------- cat/log.c | 35 ++++++++++--------- cat/ls.c | 61 +++++++++++++++++---------------- df/main.c | 43 ++++++++++++------------ diff/diff.c | 67