Displaying 13 results from an estimated 13 matches for "mexp_printf".
2014 Dec 11
1
[PATCH] p2v: show error dialog if virt-v2v fails (RHBZ#1167601)
...fig,
void (*notify_ui) (int type, const char *data))
{
int ret = -1;
+ int status;
size_t i, len;
size_t nr_disks = guestfs___count_strings (config->disks);
struct data_conn data_conns[nr_disks];
@@ -276,7 +277,7 @@ start_conversion (struct config *config,
if (mexp_printf (control_h, " ) | tee %s/virt-v2v-conversion-log.txt",
remote_dir) == -1)
goto printf_fail;
- if (mexp_printf (control_h, "; exit") == -1)
+ if (mexp_printf (control_h, "; exit $(< %s/status)", remote_dir) == -1)
goto printf_fail;...
2017 Oct 11
0
[PATCH miniexpect 2/2] Add debugging capability at runtime.
...r);
/* Wait for the password prompt. */
password_re = compile_re ("assword");
@@ -91,10 +113,16 @@ main (int argc, char *argv[])
goto error;
}
- /* Got the password prompt, so send a password. */
+ /* Got the password prompt, so send a password.
+ *
+ * Note use of mexp_printf_password here which is identical to
+ * mexp_printf except that it hides the password in debugging
+ * output.
+ */
printf ("sending the password ...\n");
- if (mexp_printf (h, "%s\n", password) == -1) {
+ if (mexp_printf_password (h, "%s", password) == -1...
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.
2017 Oct 11
1
[PATCH] p2v: Enable miniexpect debugging.
...* timeout, so that if the server is completely unresponsive we
@@ -414,7 +417,8 @@ start_ssh (unsigned spawn_flags, struct config *config,
{ 0 }
}, ovector, ovecsize)) {
case 100: /* Got password prompt. */
- if (mexp_printf (h, "%s\n", config->password) == -1) {
+ if (mexp_printf_password (h, "%s", config->password) == -1 ||
+ mexp_printf (h, "\n") == -1) {
set_ssh_mexp_error ("mexp_printf");
mexp_close (h);
return NULL;
@@ -658,6 +...
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
2016 May 31
2
[PATCH] p2v: require a non-interative sudo (RHBZ#1340809)
...e a password. This will avoid the connection to
time out.
---
p2v/ssh.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/p2v/ssh.c b/p2v/ssh.c
index b432cbd..c6bf306 100644
--- a/p2v/ssh.c
+++ b/p2v/ssh.c
@@ -490,7 +490,7 @@ test_connection (struct config *config)
*/
if (mexp_printf (h,
"%svirt-v2v --version\n",
- config->sudo ? "sudo " : "") == -1) {
+ config->sudo ? "sudo -n " : "") == -1) {
set_ssh_error ("mexp_printf: %m");
mexp_close (h);...
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,
2016 May 31
0
Re: [PATCH] p2v: require a non-interative sudo (RHBZ#1340809)
...ut.
> ---
> p2v/ssh.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/p2v/ssh.c b/p2v/ssh.c
> index b432cbd..c6bf306 100644
> --- a/p2v/ssh.c
> +++ b/p2v/ssh.c
> @@ -490,7 +490,7 @@ test_connection (struct config *config)
> */
> if (mexp_printf (h,
> "%svirt-v2v --version\n",
> - config->sudo ? "sudo " : "") == -1) {
> + config->sudo ? "sudo -n " : "") == -1) {
> set_ssh_error ("mexp_printf: %m");
>...
2015 Nov 16
0
[PATCH] p2v: Send physical server 'dmesg' output to debug dir on conversion server.
...const char *dmesg)
{
mexp_h *h;
char magic[9];
@@ -904,6 +905,24 @@ start_remote_connection (struct config *config,
if (wait_for_prompt (h) == -1)
goto error;
+ if (dmesg != NULL) {
+ /* Upload the physical host dmesg to the remote directory. */
+ if (mexp_printf (h,
+ "cat > '%s/dmesg' << '__%s__'\n"
+ "%s"
+ "\n"
+ "__%s__\n",
+ remote_dir, magic,
+ dmesg,
+...
2017 Oct 11
0
[PATCH miniexpect 1/2] When debugging, escape the buffer output.
...ead %zd bytes from pty\n", rs);
- fprintf (stderr, "DEBUG: buffer content: %s\n", h->buffer);
+ fprintf (stderr, "DEBUG: buffer content: ");
+ debug_buffer (stderr, h->buffer);
+ fprintf (stderr, "\n");
#endif
try_match:
@@ -406,7 +413,9 @@ mexp_printf (mexp_h *h, const char *fs, ...)
return -1;
#if DEBUG
- fprintf (stderr, "DEBUG: writing: %s\n", msg);
+ fprintf (stderr, "DEBUG: writing: ");
+ debug_buffer (stderr, msg);
+ fprintf (stderr, "\n");
#endif
n = len;
@@ -430,3 +439,31 @@ mexp_send_inter...
2018 Jun 29
3
p2v: Various cleanups.
These are a prelude to fixing
https://bugzilla.redhat.com/show_bug.cgi?id=1590220
A lot of the virt-p2v configuration code was duplicated manually.
These changes make sure that most of it is generated.
Rich.
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
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