1
0
mirror of https://github.com/asterinas/asterinas.git synced 2025-07-11 08:33:25 +00:00

Fix error codes in send, recv, accept

This commit is contained in:
Ruihan Li
2024-07-27 14:50:27 +08:00
committed by Tate, Hongliang Tian
parent a8592a16ea
commit a345e11b96
3 changed files with 49 additions and 4 deletions
kernel/src/net/socket/unix
test/apps/network

@ -54,7 +54,10 @@ impl TryFrom<SocketAddr> for UnixSocketAddr {
fn try_from(value: SocketAddr) -> Result<Self> {
match value {
SocketAddr::Unix(unix_socket_addr) => Ok(unix_socket_addr),
_ => return_errno_with_message!(Errno::EINVAL, "Invalid unix socket addr"),
_ => return_errno_with_message!(
Errno::EINVAL,
"the socket address is not a valid UNIX domain socket address"
),
}
}
}