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
commit 2e663eda36
Notes: sideshowbarker 2024-07-19 15:50:30 +09:00
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;