mirror of
https://github.com/RGBCube/serenity
synced 2025-06-14 15:22:07 +00:00
LibCore: Add beep wrapper
This commit is contained in:
parent
c6f745de27
commit
7801e38af1
2 changed files with 10 additions and 0 deletions
|
@ -26,6 +26,15 @@
|
||||||
namespace Core::System {
|
namespace Core::System {
|
||||||
|
|
||||||
#ifdef __serenity__
|
#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)
|
ErrorOr<void> pledge(StringView promises, StringView execpromises)
|
||||||
{
|
{
|
||||||
Syscall::SC_pledge_params params {
|
Syscall::SC_pledge_params params {
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
namespace Core::System {
|
namespace Core::System {
|
||||||
|
|
||||||
#ifdef __serenity__
|
#ifdef __serenity__
|
||||||
|
ErrorOr<void> beep();
|
||||||
ErrorOr<void> pledge(StringView promises, StringView execpromises = {});
|
ErrorOr<void> pledge(StringView promises, StringView execpromises = {});
|
||||||
ErrorOr<void> unveil(StringView path, StringView permissions);
|
ErrorOr<void> unveil(StringView path, StringView permissions);
|
||||||
ErrorOr<void> sendfd(int sockfd, int fd);
|
ErrorOr<void> sendfd(int sockfd, int fd);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue