mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:58:11 +00:00
Kernel: Add CommandLine option to disable or enable the PC speaker
By default, we disable the PC speaker as it's quite annoying when using the text mode console.
This commit is contained in:
parent
8dbbef9b5c
commit
69f054616d
5 changed files with 19 additions and 0 deletions
|
@ -155,6 +155,16 @@ UNMAP_AFTER_INIT bool CommandLine::is_legacy_time_enabled() const
|
|||
return lookup("time"sv).value_or("modern"sv) == "legacy"sv;
|
||||
}
|
||||
|
||||
bool CommandLine::is_pc_speaker_enabled() const
|
||||
{
|
||||
auto value = lookup("pcspeaker"sv).value_or("off"sv);
|
||||
if (value == "on"sv)
|
||||
return true;
|
||||
if (value == "off"sv)
|
||||
return false;
|
||||
PANIC("Unknown pcspeaker setting: {}", value);
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT bool CommandLine::is_force_pio() const
|
||||
{
|
||||
return contains("force_pio"sv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue