1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:38:10 +00:00

LibCore: Add beep wrapper

This commit is contained in:
Junior Rantila 2022-01-09 06:14:43 +01:00 committed by Ali Mohammad Pur
parent c6f745de27
commit 7801e38af1
2 changed files with 10 additions and 0 deletions

View file

@ -26,6 +26,15 @@
namespace Core::System {
#ifdef __serenity__
ErrorOr<void> beep()
{
auto rc = ::sysbeep();
if (rc < 0)
return Error::from_syscall("beep", rc);
return {};
}
ErrorOr<void> pledge(StringView promises, StringView execpromises)
{
Syscall::SC_pledge_params params {