Make EINVAL generic in FreeBSD Socket_Option_Error

The documentation for `setsockopt(2)` mentioned accept filters for
`EINVAL`, but I've found that it can arise for any manner of invalid
values for setting socket options.

We'll just have to leave this as a generic error.
This commit is contained in:
Feoramund
2024-08-05 02:04:11 -04:00
parent 42a2297d31
commit 5ece6980eb

View File

@@ -180,7 +180,8 @@ Socket_Option_Error :: enum c.int {
Not_Socket = cast(c.int)freebsd.Errno.ENOTSOCK,
Unknown_Option_For_Level = cast(c.int)freebsd.Errno.ENOPROTOOPT,
Argument_In_Invalid_Address_Space = cast(c.int)freebsd.Errno.EFAULT,
Cannot_Install_Accept_Filter_On_Non_Listening_Socket = cast(c.int)freebsd.Errno.EINVAL,
// This error can arise for many different reasons.
Invalid_Value = cast(c.int)freebsd.Errno.EINVAL,
System_Memory_Allocation_Failed = cast(c.int)freebsd.Errno.ENOMEM,
Insufficient_System_Resources = cast(c.int)freebsd.Errno.ENOBUFS,
}