|
From: | Eric Blake |
Subject: | Re: [Qemu-block] [PATCH v4] ssh: switch from libssh2 to libssh |
Date: | Tue, 13 Feb 2018 12:59:18 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 02/13/2018 12:49 PM, Max Reitz wrote:
On 2018-01-18 17:44, Pino Toscano wrote:Rewrite the implementation of the ssh block driver to use libssh instead of libssh2. The libssh library has various advantages over libssh2: - easier API for authentication (for example for using ssh-agent) - easier API for known_hosts handling - supports newer types of keys in known_hosts
@@ -628,6 +570,8 @@ static int connect_to_ssh(BDRVSSHState *s, QDict *options, Error *local_err = NULL; const char *user, *path, *host_key_check; long port = 0; + unsigned long portU = 0;I was about to say: How about making port an unsigned long and swapping the qemu_strtol() for a qemu_strtoul()? But I think you'd rather want an unsigned int instead (and that won't work with qemu_strtoul()).
Dan has a pending patch that adds qemu_strtoi() and qemu_strtoui(), when we want to deal with parsing to ints.
-- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |