mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-29 15:44:02 +00:00
vfs: remove Read_result::READ_ERR_INTERRUPT
The error condition was too vague and thereby remained unused in practice. Issue #4706
This commit is contained in:
parent
ba78cf72ae
commit
9a2c03d2c6
@ -139,7 +139,7 @@ class Vfs::Rump_file_system : public File_system
|
||||
case EWOULDBLOCK: return READ_ERR_WOULD_BLOCK;
|
||||
case EINVAL: return READ_ERR_INVALID;
|
||||
case EIO: return READ_ERR_IO;
|
||||
case EINTR: return READ_ERR_INTERRUPT;
|
||||
case EINTR: return READ_ERR_IO;
|
||||
default:
|
||||
Genode::error(__func__, ": unhandled rump error ", errno);
|
||||
return READ_ERR_IO;
|
||||
|
@ -117,7 +117,6 @@ namespace Util {
|
||||
_data + _current_offset,
|
||||
_current_count, out);
|
||||
if (result == Result::READ_QUEUED
|
||||
|| result == Result::READ_ERR_INTERRUPT
|
||||
|| result == Result::READ_ERR_WOULD_BLOCK) {
|
||||
return progress;
|
||||
} else
|
||||
|
@ -240,7 +240,6 @@ void Crypto::_execute_decrypt_block(Job &job,
|
||||
|
||||
switch (result) {
|
||||
case Read_result::READ_QUEUED: return;
|
||||
case Read_result::READ_ERR_INTERRUPT: return;
|
||||
case Read_result::READ_ERR_WOULD_BLOCK: return;
|
||||
default: break;
|
||||
}
|
||||
@ -305,7 +304,6 @@ void Crypto::_execute_encrypt_block(Job &job,
|
||||
|
||||
switch (result) {
|
||||
case Read_result::READ_QUEUED: return;
|
||||
case Read_result::READ_ERR_INTERRUPT: return;
|
||||
case Read_result::READ_ERR_WOULD_BLOCK: return;
|
||||
default: break;
|
||||
}
|
||||
|
@ -312,7 +312,6 @@ class Vfs_block_io_job
|
||||
|
||||
switch (result) {
|
||||
case Result::READ_QUEUED:
|
||||
case Result::READ_ERR_INTERRUPT:
|
||||
case Result::READ_ERR_WOULD_BLOCK:
|
||||
|
||||
return;
|
||||
|
@ -92,7 +92,6 @@ void Trust_anchor::_execute_write_read_operation(Vfs_handle &file,
|
||||
|
||||
switch (result) {
|
||||
case Read_result::READ_QUEUED:
|
||||
case Read_result::READ_ERR_INTERRUPT:
|
||||
case Read_result::READ_ERR_WOULD_BLOCK:
|
||||
|
||||
return;
|
||||
@ -201,7 +200,6 @@ void Trust_anchor::_execute_write_operation(Vfs_handle &file,
|
||||
|
||||
switch (result) {
|
||||
case Read_result::READ_QUEUED:
|
||||
case Read_result::READ_ERR_INTERRUPT:
|
||||
case Read_result::READ_ERR_WOULD_BLOCK:
|
||||
|
||||
return;
|
||||
@ -264,7 +262,6 @@ void Trust_anchor::_execute_read_operation(Vfs_handle &file,
|
||||
|
||||
switch (result) {
|
||||
case Read_result::READ_QUEUED:
|
||||
case Read_result::READ_ERR_INTERRUPT:
|
||||
case Read_result::READ_ERR_WOULD_BLOCK:
|
||||
|
||||
return;
|
||||
|
@ -181,7 +181,6 @@ class Vfs_replay
|
||||
_read_buffer.local_addr<char>(),
|
||||
request.current_count, out);
|
||||
if (result == Result::READ_QUEUED
|
||||
|| result == Result::READ_ERR_INTERRUPT
|
||||
|| result == Result::READ_ERR_WOULD_BLOCK) {
|
||||
return progress;
|
||||
}
|
||||
|
@ -93,7 +93,6 @@ namespace Vfs_cbe {
|
||||
data + _current_offset,
|
||||
_current_count, out);
|
||||
if (result == Result::READ_QUEUED
|
||||
|| result == Result::READ_ERR_INTERRUPT
|
||||
|| result == Result::READ_ERR_WOULD_BLOCK) {
|
||||
return progress;
|
||||
} else
|
||||
|
@ -1343,7 +1343,6 @@ class Vfs_cbe::Wrapper
|
||||
using Result = Vfs::File_io_service::Read_result;
|
||||
switch (r) {
|
||||
case Result::READ_QUEUED: [[fallthrough]];
|
||||
case Result::READ_ERR_INTERRUPT: [[fallthrough]];
|
||||
case Result::READ_ERR_WOULD_BLOCK: return true;
|
||||
default: break;
|
||||
}
|
||||
|
@ -1000,7 +1000,6 @@ ssize_t Libc::Vfs_plugin::read(File_descriptor *fd, void *buf,
|
||||
case Result::READ_ERR_WOULD_BLOCK: return Errno(EWOULDBLOCK);
|
||||
case Result::READ_ERR_INVALID: return Errno(EINVAL);
|
||||
case Result::READ_ERR_IO: return Errno(EIO);
|
||||
case Result::READ_ERR_INTERRUPT: return Errno(EINTR);
|
||||
case Result::READ_OK: break;
|
||||
|
||||
case Result::READ_QUEUED: /* handled above, so never reached */ break;
|
||||
@ -2219,8 +2218,7 @@ ssize_t Libc::Vfs_plugin::readlink(const char *link_path, char *buf, ::size_t bu
|
||||
case Result::READ_ERR_WOULD_BLOCK: result_errno = EWOULDBLOCK; break;
|
||||
case Result::READ_ERR_INVALID: result_errno = EINVAL; break;
|
||||
case Result::READ_ERR_IO: result_errno = EIO; break;
|
||||
case Result::READ_ERR_INTERRUPT: result_errno = EINTR; break;
|
||||
case Result::READ_OK: succeeded = true; break;
|
||||
case Result::READ_OK: succeeded = true; break;
|
||||
};
|
||||
handle->close();
|
||||
} break;
|
||||
|
@ -40,8 +40,8 @@ struct Vfs::File_io_service : Interface
|
||||
**********/
|
||||
|
||||
enum Read_result { READ_ERR_WOULD_BLOCK, READ_ERR_INVALID,
|
||||
READ_ERR_IO, READ_ERR_INTERRUPT,
|
||||
READ_QUEUED, READ_OK };
|
||||
READ_ERR_IO, READ_QUEUED,
|
||||
READ_OK };
|
||||
|
||||
/**
|
||||
* Queue read operation
|
||||
|
@ -152,7 +152,6 @@ static inline void print(Genode::Output &output, Vfs::File_io_service::Read_resu
|
||||
CASE_PRINT(READ_ERR_WOULD_BLOCK);
|
||||
CASE_PRINT(READ_ERR_INVALID);
|
||||
CASE_PRINT(READ_ERR_IO);
|
||||
CASE_PRINT(READ_ERR_INTERRUPT);
|
||||
CASE_PRINT(READ_QUEUED);
|
||||
}
|
||||
|
||||
|
@ -392,7 +392,6 @@ class Vfs_server::Io_node : public Vfs_server::Node,
|
||||
break;
|
||||
|
||||
case Read_result::READ_ERR_WOULD_BLOCK:
|
||||
case Read_result::READ_ERR_INTERRUPT:
|
||||
case Read_result::READ_QUEUED:
|
||||
break;
|
||||
}
|
||||
|
@ -89,7 +89,6 @@ namespace Vfs_block {
|
||||
data + current_offset,
|
||||
current_count, out);
|
||||
if (result == Result::READ_QUEUED
|
||||
|| result == Result::READ_ERR_INTERRUPT
|
||||
|| result == Result::READ_ERR_WOULD_BLOCK) {
|
||||
return progress;
|
||||
} else
|
||||
|
@ -118,8 +118,6 @@ inline void assert_read(Vfs::File_io_service::Read_result r)
|
||||
error("READ_ERR_INVALID"); break;
|
||||
case Result::READ_ERR_IO:
|
||||
error("READ_ERR_IO"); break;
|
||||
case Result::READ_ERR_INTERRUPT:
|
||||
error("READ_ERR_INTERRUPT"); break;
|
||||
}
|
||||
throw Exception();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user