mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 12:35:08 +00:00
Add a String::format() and use that in place of ksprintf() in the Kernel.
You're never gonna be right 100% of the time when guessing how much buffer space you need. This avoids having to make that type of decision in a bunch of cases. :^)
This commit is contained in:
parent
e9b948103d
commit
027d26cd5d
11 changed files with 40 additions and 34 deletions
|
@ -508,9 +508,7 @@ void VirtualConsole::on_tty_write(const byte* data, size_t size)
|
|||
|
||||
String VirtualConsole::tty_name() const
|
||||
{
|
||||
char buf[16];
|
||||
ksprintf(buf, "/dev/tty%u", m_index);
|
||||
return String(buf);
|
||||
return String::format("/dev/tty%u", m_index);
|
||||
}
|
||||
|
||||
void VirtualConsole::set_vga_start_row(word row)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue