mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 01:07:35 +00:00
Kernel: Changed serial debug functions and variables for readability
Change the name of set_serial_debug(bool on_or_off) to set_serial_debug_enabled(bool desired_state). This is to make the names more expressive and less unclear as to what the function does, as it only sets the enabled state. Likewise, change the name of get_serial_debug() to is_serial_debug_enabled() in order to make clear from the name that this is simply the state of s_serial_debug_enabled. Change the name of serial_debug to s_serial_debug_enabled since this is a static bool describing this state. Finally, change the signature of set_serial_debug_enabled to return a bool, as this is more logical and understandable.
This commit is contained in:
parent
cd763de280
commit
eca85f2050
3 changed files with 12 additions and 12 deletions
|
@ -319,7 +319,7 @@ void init_stage2(void*)
|
|||
|
||||
VirtualFileSystem::initialize();
|
||||
|
||||
if (!get_serial_debug())
|
||||
if (!is_serial_debug_enabled())
|
||||
(void)SerialDevice::must_create(0).leak_ref();
|
||||
(void)SerialDevice::must_create(1).leak_ref();
|
||||
(void)SerialDevice::must_create(2).leak_ref();
|
||||
|
@ -409,7 +409,7 @@ UNMAP_AFTER_INIT void setup_serial_debug()
|
|||
// 8-N-1 57600 baud. this is particularly useful for debugging the boot
|
||||
// process on live hardware.
|
||||
if (StringView { kernel_cmdline, strlen(kernel_cmdline) }.contains("serial_debug"sv)) {
|
||||
set_serial_debug(true);
|
||||
set_serial_debug_enabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue