|
|
9ae3a8 |
From 8d385a8bc9d20d1c0ec09579f14a98294b448985 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Richard Jones <rjones@redhat.com>
|
|
|
9ae3a8 |
Date: Mon, 8 Jun 2015 11:56:55 +0200
|
|
|
9ae3a8 |
Subject: [PATCH 02/30] block/ssh: Drop superfluous
|
|
|
9ae3a8 |
libssh2_session_last_errno() calls
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Message-id: <1433764620-20506-2-git-send-email-rjones@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 65477
|
|
|
9ae3a8 |
O-Subject: [RHEL-7.2 qemu-kvm PATCH 1/6] block/ssh: Drop superfluous libssh2_session_last_errno() calls
|
|
|
9ae3a8 |
Bugzilla: 1226683
|
|
|
9ae3a8 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
From: Markus Armbruster <armbru@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
libssh2_session_last_error() already returns the error code.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
|
|
|
9ae3a8 |
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Upstream-status: 04bc7c0e38fc77afc116031f1e25af80374b1971
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
block/ssh.c | 9 ++++-----
|
|
|
9ae3a8 |
1 file changed, 4 insertions(+), 5 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/block/ssh.c b/block/ssh.c
|
|
|
9ae3a8 |
index fa3c78d..1f7c6ed 100644
|
|
|
9ae3a8 |
--- a/block/ssh.c
|
|
|
9ae3a8 |
+++ b/block/ssh.c
|
|
|
9ae3a8 |
@@ -121,10 +121,9 @@ session_error_report(BDRVSSHState *s, const char *fs, ...)
|
|
|
9ae3a8 |
char *ssh_err;
|
|
|
9ae3a8 |
int ssh_err_code;
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- libssh2_session_last_error((s)->session, &ssh_err, NULL, 0);
|
|
|
9ae3a8 |
/* This is not an errno. See <libssh2.h>. */
|
|
|
9ae3a8 |
- ssh_err_code = libssh2_session_last_errno((s)->session);
|
|
|
9ae3a8 |
-
|
|
|
9ae3a8 |
+ ssh_err_code = libssh2_session_last_error(s->session,
|
|
|
9ae3a8 |
+ &ssh_err, NULL, 0);
|
|
|
9ae3a8 |
error_printf(": %s (libssh2 error code: %d)", ssh_err, ssh_err_code);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
@@ -145,9 +144,9 @@ sftp_error_report(BDRVSSHState *s, const char *fs, ...)
|
|
|
9ae3a8 |
int ssh_err_code;
|
|
|
9ae3a8 |
unsigned long sftp_err_code;
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- libssh2_session_last_error((s)->session, &ssh_err, NULL, 0);
|
|
|
9ae3a8 |
/* This is not an errno. See <libssh2.h>. */
|
|
|
9ae3a8 |
- ssh_err_code = libssh2_session_last_errno((s)->session);
|
|
|
9ae3a8 |
+ ssh_err_code = libssh2_session_last_error(s->session,
|
|
|
9ae3a8 |
+ &ssh_err, NULL, 0);
|
|
|
9ae3a8 |
/* See <libssh2_sftp.h>. */
|
|
|
9ae3a8 |
sftp_err_code = libssh2_sftp_last_error((s)->sftp);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.8.3.1
|
|
|
9ae3a8 |
|