diff options
| author | klutzy <klutzytheklutzy@gmail.com> | 2013-10-05 06:10:02 +0900 |
|---|---|---|
| committer | klutzy <klutzytheklutzy@gmail.com> | 2013-10-05 07:37:18 +0900 |
| commit | 8aadcd4851d90adfb32da6ba8da3e7e29d97c28e (patch) | |
| tree | 0d53c633b420f475b8d66f24a3eb63157258f8e0 /src/libstd/rt | |
| parent | a402fb27faabbe33f03d461d6684af4501db5ac4 (diff) | |
| download | rust-8aadcd4851d90adfb32da6ba8da3e7e29d97c28e.tar.gz rust-8aadcd4851d90adfb32da6ba8da3e7e29d97c28e.zip | |
std::rt: Add NotConnected to IoErrorKind
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/io/mod.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rt/uv/mod.rs | 1 | ||||
| -rw-r--r-- | src/libstd/rt/uv/uvll.rs | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/src/libstd/rt/io/mod.rs b/src/libstd/rt/io/mod.rs index c2f137ba119..6e622c9572c 100644 --- a/src/libstd/rt/io/mod.rs +++ b/src/libstd/rt/io/mod.rs @@ -367,6 +367,7 @@ pub enum IoErrorKind { Closed, ConnectionRefused, ConnectionReset, + NotConnected, BrokenPipe, PathAlreadyExists, PathDoesntExist, @@ -386,6 +387,7 @@ impl ToStr for IoErrorKind { Closed => ~"Closed", ConnectionRefused => ~"ConnectionRefused", ConnectionReset => ~"ConnectionReset", + NotConnected => ~"NotConnected", BrokenPipe => ~"BrokenPipe", PathAlreadyExists => ~"PathAlreadyExists", PathDoesntExist => ~"PathDoesntExist", diff --git a/src/libstd/rt/uv/mod.rs b/src/libstd/rt/uv/mod.rs index 0c5351ea9e4..67926b35a62 100644 --- a/src/libstd/rt/uv/mod.rs +++ b/src/libstd/rt/uv/mod.rs @@ -267,6 +267,7 @@ pub fn uv_error_to_io_error(uverr: UvError) -> IoError { EACCES => PermissionDenied, ECONNREFUSED => ConnectionRefused, ECONNRESET => ConnectionReset, + ENOTCONN => NotConnected, EPIPE => BrokenPipe, err => { rtdebug!("uverr.code {}", err as int); diff --git a/src/libstd/rt/uv/uvll.rs b/src/libstd/rt/uv/uvll.rs index 790bf53a291..a80d5cbc1fb 100644 --- a/src/libstd/rt/uv/uvll.rs +++ b/src/libstd/rt/uv/uvll.rs @@ -53,6 +53,7 @@ pub mod errors { pub static EACCES: c_int = -4093; pub static ECONNREFUSED: c_int = -4079; pub static ECONNRESET: c_int = -4078; + pub static ENOTCONN: c_int = -4054; pub static EPIPE: c_int = -4048; } #[cfg(not(windows))] @@ -63,6 +64,7 @@ pub mod errors { pub static EACCES: c_int = -libc::EACCES; pub static ECONNREFUSED: c_int = -libc::ECONNREFUSED; pub static ECONNRESET: c_int = -libc::ECONNRESET; + pub static ENOTCONN: c_int = -libc::ENOTCONN; pub static EPIPE: c_int = -libc::EPIPE; } |
