search for: console_sock

Displaying 20 results from an estimated 35 matches for "console_sock".

Did you mean: console_lock
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
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 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)
2017 Mar 03
2
[PATCH 1/2] Use gnulib set_nonblocking_flag function instead of fcntl.
...- 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; } if (console_sock >= 0) { - if (fcntl (console_sock, F_SETFL, O_NONBLOCK) == -1) { - perrorf (g, "new_conn_socket_listening: fcntl"); + if (set_nonblocking_flag (console_sock, 1) == -1) { + perrorf (g, "new_conn_socket_listening: set_nonblocking_flag"); return NULL;...
2016 Mar 20
0
[PATCH] conn: Pretend to be a serial terminal, so sgabios doesn't hang.
...hangs for 0.25 seconds. + * Therefore we detect this situation and send back a fake console + * size. + */ + if (memmem (buf, n, dsr_request, sizeof dsr_request - 1) != NULL) { + /* Ignore any error from this write, as it's just an optimization. + * We can't even be sure that console_sock is a socket or that + * it's writable. + */ + ignore_value (write (conn->console_sock, dsr_reply, + sizeof dsr_reply - 1)); + /* Additionally, because of a bug in sgabios, it will still pause + * unless you write at least 14 bytes, so we have to pad...
2016 Mar 22
0
[PATCH v3 05/11] conn: Pretend to be a serial terminal, so sgabios doesn't hang.
...hangs for 0.26 seconds. + * Therefore we detect this situation and send back a fake console + * size. + */ + if (memmem (buf, n, dsr_request, sizeof dsr_request - 1) != NULL) { + /* Ignore any error from this write, as it's just an optimization. + * We can't even be sure that console_sock is a socket or that + * it's writable. + */ + ignore_value (write (conn->console_sock, dsr_reply, + sizeof dsr_reply - 1)); + /* Additionally, because of a bug in sgabios, it will still pause + * unless you write at least 14 bytes, so we have to pad...
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 Mar 23
2
Re: [PATCH v3 05/11] conn: Pretend to be a serial terminal, so sgabios doesn't hang.
...+ * Therefore we detect this situation and send back a fake console > + * size. > + */ > + if (memmem (buf, n, dsr_request, sizeof dsr_request - 1) != NULL) { > + /* Ignore any error from this write, as it's just an optimization. > + * We can't even be sure that console_sock is a socket or that > + * it's writable. > + */ > + ignore_value (write (conn->console_sock, dsr_reply, > + sizeof dsr_reply - 1)); > + /* Additionally, because of a bug in sgabios, it will still pause > + * unless you write at leas...
2016 Jan 29
0
[PATCH 5/6] launch: libvirt: cleanup sockets on shutdown
..._context (g); @@ -424,7 +423,6 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri) /* For the serial console. */ snprintf (data->console_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->guest...
2013 Aug 09
4
[PATCH v2 0/4] Experimental User-Mode Linux backend.
v1 was here: https://www.redhat.com/archives/libguestfs/2013-August/msg00005.html This now works, to some extent. The main problem now is that devices are named /dev/ubd[a-] which of course confuses everything. I'm thinking it may be easier to add a udev rule to rename them. Rich.
2013 Aug 09
5
[PATCH 0/4] Not quite working User-Mode Linux backend.
This is a User-Mode Linux backend for libguestfs. You can select it by doing: export LIBGUESTFS_BACKEND=uml export LIBGUESTFS_QEMU=/path/to/vmlinux Note we're reusing the 'qemu' variable in the handle for convenience. QEmu is not involved when using the UML backend. This almost works. UML itself crashes when the daemon tries to connect to the serial port. I suspect it's
2016 Feb 02
0
Re: [PATCH 1/3] launch: add internal helper for socket paths creation
...->console_path, sizeof data->console_path, > - "%s/console.sock", g->tmpdir); > + if (guestfs_int_create_socketname (g, "console.sock", > + &data->console_path) == -1) > + goto cleanup; > > console_sock = socket (AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0); > if (console_sock == -1) { > diff --git a/src/launch.c b/src/launch.c > index f59818f..ec061e3 100644 > --- a/src/launch.c > +++ b/src/launch.c > @@ -418,6 +418,21 @@ guestfs_int_get_cpu_model (int kvm) > #endif > } >...
2016 Jan 29
0
[PATCH 6/6] launch: avoid too long paths for sockets
...console. */ - snprintf (data->console_path, sizeof data->console_path, - "%s/console.sock", g->tmpdir); + if (guestfs_int_create_socketname (g, "console.sock", + &data->console_path) == -1) + goto cleanup; console_sock = socket (AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0); if (console_sock == -1) { diff --git a/src/launch.c b/src/launch.c index f59818f..1f1f93d 100644 --- a/src/launch.c +++ b/src/launch.c @@ -418,6 +418,36 @@ guestfs_int_get_cpu_model (int kvm) #endif } +/* Create the path for a socket with the...
2012 Oct 08
3
[PATCH v3 0/3] Add support for disk labels and hotplugging.
This is, I guess, version 3 of this patch series which adds disk labels and hotplugging (only hot-add implemented so far). The good news is .. it works! Rich.
2016 Feb 03
4
[PATCH v2 1/2] launch: add internal helper for socket paths creation
...console. */ - snprintf (data->console_path, sizeof data->console_path, - "%s/console.sock", g->tmpdir); + if (guestfs_int_create_socketname (g, "console.sock", + &data->console_path) == -1) + goto cleanup; console_sock = socket (AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0); if (console_sock == -1) { diff --git a/src/launch.c b/src/launch.c index f59818f..60f02a7 100644 --- a/src/launch.c +++ b/src/launch.c @@ -418,6 +418,23 @@ guestfs_int_get_cpu_model (int kvm) #endif } +/* Create the path for a socket with the...
2016 Feb 02
6
[PATCH 1/3] launch: add internal helper for socket paths creation
...console. */ - snprintf (data->console_path, sizeof data->console_path, - "%s/console.sock", g->tmpdir); + if (guestfs_int_create_socketname (g, "console.sock", + &data->console_path) == -1) + goto cleanup; console_sock = socket (AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0); if (console_sock == -1) { diff --git a/src/launch.c b/src/launch.c index f59818f..ec061e3 100644 --- a/src/launch.c +++ b/src/launch.c @@ -418,6 +418,21 @@ guestfs_int_get_cpu_model (int kvm) #endif } +/* Create the path for a socket with the...
2012 Oct 08
5
[PATCH v4 0/5] Finish hotplugging support.
This rounds off hotplugging support by allowing you to add and remove drives at any stage (before and after launch). Rich.
2016 Jan 29
1
Re: [PATCH 6/6] launch: avoid too long paths for sockets
...->console_path, sizeof data->console_path, > - "%s/console.sock", g->tmpdir); > + if (guestfs_int_create_socketname (g, "console.sock", > + &data->console_path) == -1) > + goto cleanup; > > console_sock = socket (AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0); > if (console_sock == -1) { > diff --git a/src/launch.c b/src/launch.c > index f59818f..1f1f93d 100644 > --- a/src/launch.c > +++ b/src/launch.c > @@ -418,6 +418,36 @@ guestfs_int_get_cpu_model (int kvm) > #endif > } >...
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.
2017 Mar 03
5
[PATCH WIP 0/5] Fix virt-rescue.
This set of patches fixes virt-rescue rather cleanly. In particular the problems with handling ^C are completely fixed. Work still to be done before this can go upstream: - Shutdown doesn't work properly if you exit the shell. At the moment to exit you must do 'reboot -f'. Future improvements: - An escape sequence and escape commands that could be handled by virt-rescue,