From 12d6b04c80ced875b7186cf512d75b669832fd8c Mon Sep 17 00:00:00 2001 From: James Housley Date: Wed, 13 Jun 2007 23:02:08 +0000 Subject: [PATCH] Add libssh2_session_last_errno.3 and libssh2_session_last_error.3 --- docs/Makefile.am | 4 +++- docs/libssh2_session_last_errno.3 | 22 +++++++++++++++++++++ docs/libssh2_session_last_error.3 | 33 +++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 docs/libssh2_session_last_errno.3 create mode 100644 docs/libssh2_session_last_error.3 diff --git a/docs/Makefile.am b/docs/Makefile.am index 8421fdc..10af2df 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -1,4 +1,4 @@ -# $Id: Makefile.am,v 1.15 2007/06/13 21:30:15 jehousley Exp $ +# $Id: Makefile.am,v 1.16 2007/06/13 23:02:08 jehousley Exp $ EXTRA_DIST = template.3 @@ -26,6 +26,8 @@ dist_man_MANS = libssh2_session_free.3 \ libssh2_session_disconnect_ex.3 \ libssh2_session_init.3 \ + libssh2_session_last_errno.3 \ + libssh2_session_last_error.3 \ libssh2_session_startup.3 \ libssh2_poll.3 \ libssh2_poll_channel_read.3 \ diff --git a/docs/libssh2_session_last_errno.3 b/docs/libssh2_session_last_errno.3 new file mode 100644 index 0000000..3efa04b --- /dev/null +++ b/docs/libssh2_session_last_errno.3 @@ -0,0 +1,22 @@ +.\" $Id: libssh2_session_last_errno.3,v 1.1 2007/06/13 23:02:08 jehousley Exp $ +.\" +.TH libssh2_session_last_errno 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual" +.SH NAME +libssh2_session_last_errno - get the most recent error number +.SH SYNOPSIS +#include + +int +libssh2_session_last_errno(LIBSSH2_SESSION *session); + +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init(3) + +Determine the most recent error condition. + +.SH RETURN VALUE +Numeric error code corresponding to the the Error Code constants. + +.SH SEE ALSO +.BR libssh2_session_last_error(3) diff --git a/docs/libssh2_session_last_error.3 b/docs/libssh2_session_last_error.3 new file mode 100644 index 0000000..8636ad2 --- /dev/null +++ b/docs/libssh2_session_last_error.3 @@ -0,0 +1,33 @@ +.\" $Id: libssh2_session_last_error.3,v 1.1 2007/06/13 23:02:08 jehousley Exp $ +.\" +.TH libssh2_session_last_error 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual" +.SH NAME +libssh2_session_last_error - get the most recent error +.SH SYNOPSIS +#include + +int +libssh2_session_last_error(LIBSSH2_SESSION *session, char **errmsg, int *errmsg_len, int want_buf); + +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init(3) + +\fIerrmsg\fP - If not NULL, is populated by reference with the human +readable form of the most recent error message. + +\fIerrmsg_len\fP - If not NULL, is populated by reference with the length +of errmsg. (The string is NUL-terminated, so the length is only useful as +an optimization, to avoid calling strlen.) + +\fIwant_buf\fP - If set to a non-zero value, "ownership" of the errmsg +buffer will be given to the calling scope. If necessary, the errmsg buffer +will be duplicated. + +Determine the most recent error condition and its cause. + +.SH RETURN VALUE +Numeric error code corresponding to the the Error Code constants. + +.SH SEE ALSO +.BR libssh2_session_last_errno(3)