summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Reedy <breed808@breed808.com>2018-04-14 11:27:25 +1000
committerBen Reedy <breed808@breed808.com>2018-04-14 11:27:25 +1000
commit9bdd43ea7cd47c9d498db5639a693e38671b8b55 (patch)
tree03fe14a2c6aeb88d63e720d7ae98117cc1eb27bd /src
parent00067c96dd60a1e7180895886f0bac3761a3f40c (diff)
downloadssh2-rs-9bdd43ea7cd47c9d498db5639a693e38671b8b55.zip
Add libssh2 SFTP error codes
Diffstat (limited to 'src')
-rw-r--r--src/error.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
index e402010..0911e57 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -97,6 +97,27 @@ impl Error {
raw::LIBSSH2_ERROR_ENCRYPT => "bad encrypt",
raw::LIBSSH2_ERROR_BAD_SOCKET => "bad socket",
raw::LIBSSH2_ERROR_KNOWN_HOSTS => "known hosts error",
+ raw::LIBSSH2_FX_EOF => "end of file",
+ raw::LIBSSH2_FX_NO_SUCH_FILE => "no such file",
+ raw::LIBSSH2_FX_PERMISSION_DENIED => "permission denied",
+ raw::LIBSSH2_FX_FAILURE => "failure",
+ raw::LIBSSH2_FX_BAD_MESSAGE => "bad message",
+ raw::LIBSSH2_FX_NO_CONNECTION => "no connection",
+ raw::LIBSSH2_FX_CONNECTION_LOST => "connection lost",
+ raw::LIBSSH2_FX_OP_UNSUPPORTED => "operation unsupported",
+ raw::LIBSSH2_FX_INVALID_HANDLE => "invalid handle",
+ raw::LIBSSH2_FX_NO_SUCH_PATH => "no such path",
+ raw::LIBSSH2_FX_FILE_ALREADY_EXISTS => "file already exists",
+ raw::LIBSSH2_FX_WRITE_PROTECT => "file is write protected",
+ raw::LIBSSH2_FX_NO_MEDIA => "no media available",
+ raw::LIBSSH2_FX_NO_SPACE_ON_FILESYSTEM => "no space on filesystem",
+ raw::LIBSSH2_FX_QUOTA_EXCEEDED => "quota exceeded",
+ raw::LIBSSH2_FX_UNKNOWN_PRINCIPAL => "unknown principal",
+ raw::LIBSSH2_FX_LOCK_CONFLICT => "lock conflict",
+ raw::LIBSSH2_FX_DIR_NOT_EMPTY => "directory not empty",
+ raw::LIBSSH2_FX_NOT_A_DIRECTORY => "not a directory",
+ raw::LIBSSH2_FX_INVALID_FILENAME => "invalid filename",
+ raw::LIBSSH2_FX_LINK_LOOP => "link loop",
_ => "unknown error"
};
Error::new(code, msg)