LibCore: Add beep wrapper

This commit is contained in:
Junior Rantila 2022-01-09 06:14:43 +01:00 committed by Ali Mohammad Pur
commit 7801e38af1
Notes: sideshowbarker 2024-07-17 21:21:12 +09:00
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 {