mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:07:45 +00:00
Kernel: Make the getsockname/getpeername syscall helper a bit nicer
Instead of templatizing on a bool parameter, use an enum for clarity.
This commit is contained in:
parent
5bc7882b68
commit
3371165588
2 changed files with 9 additions and 5 deletions
|
@ -454,7 +454,11 @@ public:
|
|||
ErrorOr<FlatPtr> sys$jail_attach(Userspace<Syscall::SC_jail_attach_params const*> user_params);
|
||||
ErrorOr<FlatPtr> sys$get_root_session_id(pid_t force_sid);
|
||||
|
||||
template<bool sockname, typename Params>
|
||||
enum SockOrPeerName {
|
||||
SockName,
|
||||
PeerName,
|
||||
};
|
||||
template<SockOrPeerName, typename Params>
|
||||
ErrorOr<void> get_sock_or_peer_name(Params const&);
|
||||
|
||||
static void initialize();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue