search for: mexp_h

Displaying 20 results from an estimated 20 matches for "mexp_h".

2017 Oct 11
0
[PATCH miniexpect 2/2] Add debugging capability at runtime.
...e <config.h> @@ -42,9 +44,18 @@ static pcre *compile_re (const char *rex); +static void +usage (void) +{ + fprintf (stderr, "usage: sshpass PASSWORD ssh [SSH-ARGS...] HOST\n"); + exit (EXIT_FAILURE); +} + int main (int argc, char *argv[]) { + int opt; + int debug = 0; mexp_h *h; const char *password; int status; @@ -52,20 +63,31 @@ main (int argc, char *argv[]) const int ovecsize = 12; int ovector[ovecsize]; - if (argc <= 3) { - fprintf (stderr, "usage: sshpass PASSWORD ssh [SSH-ARGS...] HOST\n"); - exit (EXIT_FAILURE); + while ((opt...
2017 Oct 11
5
[PATCH miniexpect 0/2] Add debugging capability at runtime.
Currently you can only turn on miniexpect debugging by recompiling. These two patches make it configurable at runtime, and also improve the usefulness of the output. Rich.
2015 Nov 16
0
[PATCH] p2v: Send physical server 'dmesg' output to debug dir on conversion server.
...p2v/conversion.c +++ b/p2v/conversion.c @@ -37,6 +37,8 @@ #include <libxml/xmlwriter.h> +#include "ignore-value.h" + #include "miniexpect.h" #include "p2v.h" @@ -129,6 +131,10 @@ start_conversion (struct config *config, time_t now; struct tm tm; mexp_h *control_h = NULL; + char dmesg_file[] = "/tmp/dmesg.XXXXXX"; + char dmesg_cmd[64]; + CLEANUP_FREE char *dmesg = NULL; + int fd, r; #if DEBUG_STDERR print_config (config, stderr); @@ -230,11 +236,35 @@ start_conversion (struct config *config, fprintf (stderr, "%s: libvir...
2017 Oct 11
0
[PATCH miniexpect 1/2] When debugging, escape the buffer output.
...#include <stdlib.h> #include <stdarg.h> #include <string.h> +#include <ctype.h> #include <fcntl.h> #include <unistd.h> #include <signal.h> @@ -47,6 +48,10 @@ #define DEBUG 0 +#if DEBUG +static void debug_buffer (FILE *, char *); +#endif + static mexp_h * create_handle (void) { @@ -333,7 +338,9 @@ mexp_expect (mexp_h *h, const mexp_regexp *regexps, int *ovector, int ovecsize) h->buffer[h->len] = '\0'; #if DEBUG fprintf (stderr, "DEBUG: read %zd bytes from pty\n", rs); - fprintf (stderr, "DEBUG: buffer c...
2016 Jun 30
4
[PATCH 0/4] p2v: Send ^C to remote end to cancel the conversion.
(I don't have a BZ# for this yet, but I'm expecting it to be filed as an RFE) Currently if the user is in the virt-p2v GUI and cancels the conversion, all that happens is we abruptly close the ssh session to virt-v2v. That is bad .. possibly (or maybe not). But in any case there is an alternative: we can send a ^C key to the virt-v2v process, which it could catch and handle gracefully,
2017 Oct 12
1
Re: [PATCH miniexpect 2/2] Add debugging capability at runtime.
On Wednesday, 11 October 2017 17:23:45 CEST Richard W.M. Jones wrote: > +static int > +mexp_vprintf (mexp_h *h, int password, const char *fs, va_list args) > { > - va_list args; > char *msg; > int len; > size_t n; > ssize_t r; > char *p; > > - va_start (args, fs); > len = vasprintf (&msg, fs, args); > - va_end (args); Due to the nature of va_l...
2019 Jul 09
7
[PATCH 0/5] Split virt-p2v in own repository
Hi, as it was already discussed on this list, here it is my attempt in splitting virt-p2v in an own repository. Sadly there are things that must be copied from libguestfs, as it cannot be avoided. The approach taken was to run a script (will send separately) to just get the "p2v" subdirectory with its history as own repository, and then add in few followup commits all the bits needed
2016 Jun 18
8
[PATCH 0/7] p2v: Multiple improvements to the look of virt-p2v.
In the run dialog, I have implemented an ANSI colour escape sequence interpreter, so that colours displayed by the remote virt-v2v are now shown to the user. (https://bugzilla.redhat.com/show_bug.cgi?id=1314244) This requires virt-v2v to send colours. It wasn't doing that because the output was a pipe (as we capture the output into the log file). So I added a global --colours option to make
2017 Feb 03
5
[PATCH 0/5] Support socket activation in virt-p2v.
As the subject says, support socket activation in virt-p2v. I have added upstream support for socket activation to nbdkit already: https://github.com/libguestfs/nbdkit/commit/7ff39d028c6359f5c0925ed2cf4a2c4c751af2e4 I posted a patch for qemu-nbd, still waiting on more reviews for that one: https://www.mail-archive.com/qemu-devel@nongnu.org/msg427246.html I tested this against old and new qemu
2017 Feb 04
4
[PATCH 0/4] p2v: Send ping packets, document timeout problems.
Fix and/or document issues raised in this thread: https://www.redhat.com/archives/libguestfs/2017-February/msg00010.html Rich.
2019 Jul 12
8
[p2v PATCH 0/5] More small fixes
See individual patches for details. Pino Toscano (5): Include signal.h Remove unused variables Push -Wsuggest-attribute=noreturn only with GCC tests: do not set libguestfs environment variables Define the GCC version macro Makefile.am | 2 +- conversion.c | 3 +++ p2v.h | 7 +++++++ ssh.c | 8 +++++--- 4 files changed, 16 insertions(+), 4 deletions(-) -- 2.21.0
2019 Sep 10
3
[PATCH 0/2] Remove virt-p2v from libguestfs
Now that virt-p2v has its own repository [1] and releases [2], it is time to remove it from libguestfs. [1] https://github.com/libguestfs/virt-p2v [2] http://download.libguestfs.org/virt-p2v/ Pino Toscano (2): Remove virt-p2v Remove remaining virt-p2v bits .gitignore | 4 - Makefile.am | 7 +- bash/Makefile.am
2014 Dec 12
2
[PATCH] p2v: avoid connecting to ourself while probing qemu-nbd (RHBZ#1167774)
.... This avoids the case where + * the kernel selects 50123 as our source port, and we immediately + * connect to ourself. + * See: https://bugzilla.redhat.com/show_bug.cgi?id=1167774#c9 + */ +static int nbd_probe_port = 50124; + /* Data per NBD connection / physical disk. */ struct data_conn { mexp_h *h; /* miniexpect handle to ssh */ @@ -398,7 +408,7 @@ wait_qemu_nbd (int nbd_local_port, int timeout_seconds) { int sockfd; int result = -1; - struct sockaddr_in addr; + struct sockaddr_in src_addr, dst_addr; time_t start_t, now_t; struct timeval timeout = { .tv_usec...
2017 Mar 30
4
[PATCH 0/3] p2v, v2v: Ensure the full version is always available in several places.
After debugging a virt-p2v issue with a customer in the middle of the night on Tuesday, I felt it would have been helpful to know exactly which version(s) of virt-p2v and virt-v2v they were using. That wasn't very clear from the log file I was provided with, so this change makes sure the information is included every time. Rich.
2014 Dec 05
2
[PATCH] p2v: wait for qemu-nbd before starting conversion (RHBZ#1167774)
.../p2v/conversion.c +++ b/p2v/conversion.c @@ -31,6 +31,8 @@ #include <libintl.h> #include <sys/types.h> #include <sys/wait.h> +#include <arpa/inet.h> +#include <netinet/in.h> #include <glib.h> @@ -49,6 +51,7 @@ struct data_conn { static int send_quoted (mexp_h *, const char *s); static pid_t start_qemu_nbd (int nbd_local_port, const char *device); +static int wait_qemu_nbd (int nbd_local_port, int timeout_seconds); static void cleanup_data_conns (struct data_conn *data_conns, size_t nr); static char *generate_libvirt_xml (struct config *, struct data_...
2016 Oct 24
2
[PATCH] p2v: Inhibit power saving during the conversion.
...a/p2v/p2v.h +++ b/p2v/p2v.h @@ -120,6 +120,9 @@ extern const char *get_conversion_error (void); extern void cancel_conversion (void); extern int conversion_is_running (void); +/* inhibit.c */ +extern int inhibit_sleep (void); + /* ssh.c */ extern int test_connection (struct config *); extern mexp_h *open_data_connection (struct config *, int *local_port, int *remote_port); -- 2.9.3
2017 Jan 26
3
[PATCH 0/3] p2v: Allow nbdkit as an alternative NBD server.
qemu-nbd is a fine NBD server. However it's not easy to compile a reliably working version on RHEL 5. This patch series allows nbdkit to be used as an alternative (qemu-nbd is still the default). Rich.
2015 Aug 25
4
[PATCH 0/4] Various p2v fixes and features
A mixed bag, but all the patches make sense together! Patch 1: Fix a bug that Tingting found: https://bugzilla.redhat.com/show_bug.cgi?id=1256222 Patch 2: Revert a patch that makes no sense now that we've added virt-v2v into base RHEL. This is just included because it's a cleanup needed before applying patch 3. Patch 3: Add the ability to use SSH identities (private keys) for virt-p2v
2015 Aug 27
5
[PATCH v2 0/4] p2v: Wait for network to come online before testing connection
Fixes https://bugzilla.redhat.com/1256222
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.