Use rtabort! instead of process::abort

This commit is contained in:
Chris Denton 2022-07-06 16:36:52 +01:00
parent 54f79babae
commit ae60dbdcac
No known key found for this signature in database
GPG Key ID: 713472F2F45627DE

View File

@ -252,10 +252,7 @@ impl Handle {
// If the operation has not completed then abort the process.
// Doing otherwise means that the buffer and stack may be written to
// after this function returns.
c::STATUS_PENDING => {
eprintln!("I/O error: operation failed to complete synchronously");
crate::process::abort();
}
c::STATUS_PENDING => rtabort!("I/O error: operation failed to complete synchronously"),
// Return `Ok(0)` when there's nothing more to read.
c::STATUS_END_OF_FILE => Ok(0),
@ -298,9 +295,7 @@ impl Handle {
// If the operation has not completed then abort the process.
// Doing otherwise means that the buffer may be read and the stack
// written to after this function returns.
c::STATUS_PENDING => {
rtabort!("I/O error: operation failed to complete synchronously");
}
c::STATUS_PENDING => rtabort!("I/O error: operation failed to complete synchronously"),
// Success!
status if c::nt_success(status) => Ok(io_status.Information),