diff --git a/artiq/firmware/ksupport/lib.rs b/artiq/firmware/ksupport/lib.rs index 229e616c2..e2f7696a2 100644 --- a/artiq/firmware/ksupport/lib.rs +++ b/artiq/firmware/ksupport/lib.rs @@ -129,7 +129,7 @@ extern fn rpc_send_async(service: u32, tag: CSlice, data: *const *const ()) }; io::ProtoWrite::write_u32(&mut slice, length as u32) }).unwrap_or_else(|err| { - assert!(err == io::Error::UnexpectedEof); + assert!(err == io::Error::UnexpectedEnd); while !rpc_queue::empty() {} send(&RpcSend { diff --git a/artiq/firmware/libio/lib.rs b/artiq/firmware/libio/lib.rs index 486e4ae7b..654f68c36 100644 --- a/artiq/firmware/libio/lib.rs +++ b/artiq/firmware/libio/lib.rs @@ -26,7 +26,7 @@ pub type Result = result::Result>; #[derive(Fail, Debug, Clone, PartialEq)] pub enum Error { #[fail(display = "unexpected end of stream")] - UnexpectedEof, + UnexpectedEnd, #[fail(display = "unrecognized input")] Unrecognized, #[fail(display = "{}", _0)] @@ -51,7 +51,7 @@ pub trait Read { while !buf.is_empty() { let read_bytes = self.read(buf)?; if read_bytes == 0 { - return Err(Error::UnexpectedEof) + return Err(Error::UnexpectedEnd) } buf = &mut { buf }[read_bytes..]; @@ -85,7 +85,7 @@ pub trait Write { while buf.len() > 0 { let written_bytes = self.write(buf)?; if written_bytes == 0 { - return Err(Error::UnexpectedEof) + return Err(Error::UnexpectedEnd) } buf = &buf[written_bytes..]; diff --git a/artiq/firmware/runtime/mgmt.rs b/artiq/firmware/runtime/mgmt.rs index 574f55df8..b23b6bbcc 100644 --- a/artiq/firmware/runtime/mgmt.rs +++ b/artiq/firmware/runtime/mgmt.rs @@ -165,7 +165,7 @@ pub fn thread(io: Io) { let mut stream = TcpStream::from_handle(&io, stream); match worker(&io, &mut stream) { Ok(()) => (), - Err(io::Error::UnexpectedEof) => (), + Err(io::Error::UnexpectedEnd) => (), Err(err) => error!("aborted: {}", err) } }); diff --git a/artiq/firmware/runtime/session.rs b/artiq/firmware/runtime/session.rs index 63e397776..dced8025c 100644 --- a/artiq/firmware/runtime/session.rs +++ b/artiq/firmware/runtime/session.rs @@ -674,7 +674,7 @@ pub fn thread(io: Io) { let mut stream = TcpStream::from_handle(&io, stream); match host_kernel_worker(&io, &mut stream, &mut *congress) { Ok(()) => (), - Err(io::Error::UnexpectedEof) => { + Err(io::Error::UnexpectedEnd) => { info!("connection closed"); } Err(io::Error::Other(ref err))