Right now, we'd always be setting a NULL username.
---
src/drives.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/drives.c b/src/drives.c
index a13dd03..0e62ca8 100644
--- a/src/drives.c
+++ b/src/drives.c
@@ -1105,7 +1105,7 @@ guestfs___drive_source_qemu_param (guestfs_h *g, const
struct drive_source *src)
CLEANUP_FREE char *username = NULL, *port = NULL;
if (src->username)
- username = safe_asprintf (g, "%s@", username);
+ username = safe_asprintf (g, "%s@", src->username);
if (src->servers[0].port != 0)
port = safe_asprintf (g, ":%d", src->servers[0].port);
--
1.7.9.5
Richard W.M. Jones
2013-Apr-30 21:33 UTC
[Libguestfs] [PATCH] ssh: fix setting the username part
On Tue, Apr 30, 2013 at 01:49:10PM -0400, Mike Kelly wrote:> Right now, we'd always be setting a NULL username. > --- > src/drives.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/drives.c b/src/drives.c > index a13dd03..0e62ca8 100644 > --- a/src/drives.c > +++ b/src/drives.c > @@ -1105,7 +1105,7 @@ guestfs___drive_source_qemu_param (guestfs_h *g, const struct drive_source *src) > CLEANUP_FREE char *username = NULL, *port = NULL; > > if (src->username) > - username = safe_asprintf (g, "%s@", username); > + username = safe_asprintf (g, "%s@", src->username); > if (src->servers[0].port != 0) > port = safe_asprintf (g, ":%d", src->servers[0].port);Ummm ... ooops. Thanks, I have pushed this. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top