1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:48:11 +00:00

Kernel: Don't disable interrupts to access the system hostname.

This commit is contained in:
Andreas Kling 2019-02-07 10:29:26 +01:00
parent 458706c4cf
commit 2e663eda36
3 changed files with 18 additions and 16 deletions

View file

@ -40,6 +40,16 @@ void strcpy(char* dest, const char *src)
while ((*dest++ = *src++) != '\0');
}
char* strncpy(char* dest, const char* src, size_t n)
{
size_t i;
for (i = 0; i < n && src[i] != '\0'; ++i)
dest[i] = src[i];
for ( ; i < n; ++i)
dest[i] = '\0';
return dest;
}
void* memset(void* dest_ptr, byte c, dword n)
{
dword dest = (dword)dest_ptr;