Kernel+LibC: Add some errno codes

Kernel now returns ENOMEM and other errnos, so we dont have to write
error messages
This commit is contained in:
Bananymous
2023-03-02 21:10:44 +02:00
parent 90a7268e5a
commit 52aa98ba25
16 changed files with 87 additions and 31 deletions

View File

@@ -230,7 +230,7 @@ namespace BAN
size_type new_cap = BAN::Math::max<size_type>(size, m_capacity * 2);
void* new_data = BAN::allocator(new_cap);
if (new_data == nullptr)
return Error::from_string("String: Could not allocate memory");
return Error::from_errno(ENOMEM);
if (m_data)
memcpy(new_data, m_data, m_size + 1);
BAN::deallocator(m_data);