1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:47:45 +00:00

Add a simple /bin/sysctl that wraps the files in /proc/sys.

This commit is contained in:
Andreas Kling 2019-01-18 15:35:38 +01:00
parent f7cc454162
commit 7e044cf293
5 changed files with 151 additions and 4 deletions

View file

@ -40,12 +40,14 @@ void StringBuilder::appendf(const char* fmt, ...)
ByteBuffer StringBuilder::to_byte_buffer()
{
m_buffer.trim(m_length);
return m_buffer;
return move(m_buffer);
}
String StringBuilder::build()
{
return String((const char*)m_buffer.pointer(), m_length);
auto string = String((const char*)m_buffer.pointer(), m_length);
m_buffer.clear();
return string;
}
}