Kernel: Return ENOTSUP instead of panicking on invalid sockopt

X11 handles this gracefully, and it makes more sense than panicking.
This commit is contained in:
Peter Elliott 2021-08-02 22:13:54 -06:00 committed by Andreas Kling
parent ee0c6e1b6d
commit 38e0d1b456
Notes: sideshowbarker 2024-07-18 05:24:22 +09:00

View file

@ -399,9 +399,9 @@ KResult LocalSocket::getsockopt(FileDescription& description, int level, int opt
switch (option) {
case SO_SNDBUF:
TODO();
return ENOTSUP;
case SO_RCVBUF:
TODO();
return ENOTSUP;
case SO_PEERCRED: {
if (size < sizeof(ucred))
return EINVAL;