mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 18:47:41 +00:00
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:
parent
ee0c6e1b6d
commit
38e0d1b456
1 changed files with 2 additions and 2 deletions
|
@ -399,9 +399,9 @@ KResult LocalSocket::getsockopt(FileDescription& description, int level, int opt
|
||||||
|
|
||||||
switch (option) {
|
switch (option) {
|
||||||
case SO_SNDBUF:
|
case SO_SNDBUF:
|
||||||
TODO();
|
return ENOTSUP;
|
||||||
case SO_RCVBUF:
|
case SO_RCVBUF:
|
||||||
TODO();
|
return ENOTSUP;
|
||||||
case SO_PEERCRED: {
|
case SO_PEERCRED: {
|
||||||
if (size < sizeof(ucred))
|
if (size < sizeof(ucred))
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue