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

Reply via email to