Skip to content
Snippets Groups Projects
Commit 9b59a198 authored by Guido Günther's avatar Guido Günther
Browse files

drop patches applied upstream:

  * 0004-Don-t-hardcode-ssh-port.patch
  * 0005-minimal-workaround-for-qemu-startup-race.patch
parent 38fde156
No related branches found
No related tags found
No related merge requests found
From: =?utf-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
Date: Fri, 30 Jan 2009 22:01:15 +0100
Subject: [PATCH] Don't hardcode ssh port
based on a patch by Adrian Bridgett.
Closes: #513605
---
src/remote_internal.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/remote_internal.c b/src/remote_internal.c
index f8740af..dbd9673 100644
--- a/src/remote_internal.c
+++ b/src/remote_internal.c
@@ -387,9 +387,6 @@ doRemoteOpen (virConnectPtr conn,
} else if (transport == trans_tcp) {
port = strdup (LIBVIRTD_TCP_PORT);
if (!port) goto out_of_memory;
- } else if (transport == trans_ssh) {
- port = strdup ("22");
- if (!port) goto out_of_memory;
} else
port = NULL; /* Port not used for unix, ext. */
@@ -673,24 +670,27 @@ doRemoteOpen (virConnectPtr conn,
}
case trans_ssh: {
- int j, nr_args = 8;
+ int j, nr_args = 6;
if (username) nr_args += 2; /* For -l username */
if (no_tty) nr_args += 5; /* For -T -o BatchMode=yes -e none */
+ if (port) nr_args += 2; /* For -p port */
command = command ? command : strdup ("ssh");
if (command == NULL)
goto out_of_memory;
// Generate the final command argv[] array.
- // ssh -p $port [-l $username] $hostname $netcat -U $sockname [NULL]
+ // ssh [-p $port] [-l $username] $hostname $netcat -U $sockname [NULL]
if (VIR_ALLOC_N(cmd_argv, nr_args) < 0)
goto out_of_memory;
j = 0;
cmd_argv[j++] = strdup (command);
- cmd_argv[j++] = strdup ("-p");
- cmd_argv[j++] = strdup (port);
+ if (port) {
+ cmd_argv[j++] = strdup ("-p");
+ cmd_argv[j++] = strdup (port);
+ }
if (username) {
cmd_argv[j++] = strdup ("-l");
cmd_argv[j++] = strdup (username);
--
From: =?utf-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
Date: Sat, 31 Jan 2009 14:54:36 +0100
Subject: [PATCH] minimal workaround for qemu startup race
---
src/qemu_driver.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index 09f69bf..b2f2b47 100644
--- a/src/qemu_driver.c
+++ b/src/qemu_driver.c
@@ -674,8 +674,6 @@ qemudReadMonitorOutput(virConnectPtr conn,
_("Failure while reading %s startup output"), what);
return -1;
}
- } else if (ret == 0) {
- return 0;
} else {
got += ret;
buf[got] = '\0';
--
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment