mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:17:44 +00:00
Userland: Teach strace(1) to format pledge(2)
This commit is contained in:
parent
8c8ba4cfe4
commit
cd4298ae04
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);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
// TODO: format fds and sigmask properly
|
||||
|
@ -749,6 +758,9 @@ static ErrorOr<void> format_syscall(FormattedSyscallBuilder& builder, Syscall::F
|
|||
case SC_open:
|
||||
TRY(format_open(builder, (Syscall::SC_open_params*)arg1));
|
||||
break;
|
||||
case SC_pledge:
|
||||
TRY(format_pledge(builder, (Syscall::SC_pledge_params*)arg1));
|
||||
break;
|
||||
case SC_poll:
|
||||
TRY(format_poll(builder, (Syscall::SC_poll_params*)arg1));
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue