mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
Kernel: Introduce a StringView overload of dbgputstr(..)
This commit is contained in:
parent
060503ef25
commit
1ee1ef5103
Notes:
sideshowbarker
2024-07-18 07:02:38 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/1ee1ef51033 Pull-request: https://github.com/SerenityOS/serenity/pull/9372
2 changed files with 9 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <AK/PrintfImplementation.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/ConsoleDevice.h>
|
||||
#include <Kernel/Devices/PCISerialDevice.h>
|
||||
|
@ -165,6 +166,11 @@ extern "C" void dbgputstr(const char* characters, size_t length)
|
|||
internal_dbgputch(characters[i]);
|
||||
}
|
||||
|
||||
void dbgputstr(StringView view)
|
||||
{
|
||||
::dbgputstr(view.characters_without_null_termination(), view.length());
|
||||
}
|
||||
|
||||
extern "C" void kernelputstr(const char* characters, size_t length)
|
||||
{
|
||||
if (!characters)
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
extern "C" {
|
||||
|
@ -17,3 +18,5 @@ int snprintf(char* buf, size_t, const char* fmt, ...) __attribute__((format(prin
|
|||
void set_serial_debug(bool on_or_off);
|
||||
int get_serial_debug();
|
||||
}
|
||||
|
||||
void dbgputstr(StringView view);
|
||||
|
|
Loading…
Reference in a new issue