[Libguestfs] [PATCH 1/4] p2v: Set an SSH error message if mexp_spawnv fails.

Richard W.M. Jones rjones at redhat.com
Thu Jun 30 13:43:29 UTC 2016


---
 p2v/ssh.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/p2v/ssh.c b/p2v/ssh.c
index 6d264e2..07fa25e 100644
--- a/p2v/ssh.c
+++ b/p2v/ssh.c
@@ -374,8 +374,10 @@ start_ssh (struct config *config, char **extra_args, int wait_prompt)
 
   /* Create the miniexpect handle. */
   h = mexp_spawnv ("ssh", (char **) args);
-  if (h == NULL)
+  if (h == NULL) {
+    set_ssh_internal_error ("ssh: mexp_spawnv: %m");
     return NULL;
+  }
 
   /* We want the ssh ConnectTimeout to be less than the miniexpect
    * timeout, so that if the server is completely unresponsive we
-- 
2.7.4




More information about the Libguestfs mailing list