mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 20:42:21 +00:00
Userland: Teach strace(1) to format pledge(2)
This commit is contained in:
parent
8c8ba4cfe4
commit
cd4298ae04
Notes:
sideshowbarker
2024-07-16 17:05:37 +09:00
Author: https://github.com/bugaevc
Commit: cd4298ae04
Pull-request: https://github.com/SerenityOS/serenity/pull/20158
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
Reviewed-by: https://github.com/timschumi
1 changed files with 12 additions and 0 deletions
|
@ -579,6 +579,15 @@ static void format_close(FormattedSyscallBuilder& builder, int fd)
|
||||||
builder.add_arguments(fd);
|
builder.add_arguments(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static ErrorOr<void> format_pledge(FormattedSyscallBuilder& builder, Syscall::SC_pledge_params* params_p)
|
||||||
|
{
|
||||||
|
auto params = TRY(copy_from_process(params_p));
|
||||||
|
builder.add_arguments(
|
||||||
|
StringArgument { params.promises },
|
||||||
|
StringArgument { params.execpromises });
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
static ErrorOr<void> format_poll(FormattedSyscallBuilder& builder, Syscall::SC_poll_params* params_p)
|
static ErrorOr<void> format_poll(FormattedSyscallBuilder& builder, Syscall::SC_poll_params* params_p)
|
||||||
{
|
{
|
||||||
// TODO: format fds and sigmask properly
|
// TODO: format fds and sigmask properly
|
||||||
|
@ -749,6 +758,9 @@ static ErrorOr<void> format_syscall(FormattedSyscallBuilder& builder, Syscall::F
|
||||||
case SC_open:
|
case SC_open:
|
||||||
TRY(format_open(builder, (Syscall::SC_open_params*)arg1));
|
TRY(format_open(builder, (Syscall::SC_open_params*)arg1));
|
||||||
break;
|
break;
|
||||||
|
case SC_pledge:
|
||||||
|
TRY(format_pledge(builder, (Syscall::SC_pledge_params*)arg1));
|
||||||
|
break;
|
||||||
case SC_poll:
|
case SC_poll:
|
||||||
TRY(format_poll(builder, (Syscall::SC_poll_params*)arg1));
|
TRY(format_poll(builder, (Syscall::SC_poll_params*)arg1));
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue