mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
Kernel: Rewrite ProcFS.
Now the filesystem is generated on-the-fly instead of manually adding and removing inodes as processes spawn and die. The code is convoluted and bloated as I wrote it while sleepless. However, it's still vastly better than the old ProcFS, so I'm committing it. I also added /proc/PID/fd/N symlinks for each of a process's open fd's.
This commit is contained in:
@@ -92,10 +92,10 @@ int strcmp(const char *s1, const char *s2)
|
||||
|
||||
char* strdup(const char *str)
|
||||
{
|
||||
dword len = strlen(str);
|
||||
char *s = (char*)kmalloc(len);
|
||||
memcpy(s, str, len);
|
||||
return s;
|
||||
size_t len = strlen(str);
|
||||
char* new_str = (char*)kmalloc(len + 1);
|
||||
strcpy(new_str, str);
|
||||
return new_str;
|
||||
}
|
||||
|
||||
int memcmp(const void* v1, const void* v2, size_t n)
|
||||
|
||||
Reference in New Issue
Block a user