fs: move fs init into kernel cmdline
Previously, any partition with an ext2 filesystem would be mounted by the gpt header parser. With this patch, the kernel cmdline `root=val` is responsible for mounting the root filesystem.
This commit is contained in:
parent
5ebafca2e6
commit
25a828437a
10 changed files with 150 additions and 32 deletions
12
lib/string.c
12
lib/string.c
|
|
@ -1,5 +1,4 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#include "kernel/pio.h"
|
||||
#include <kernel/slab.h>
|
||||
#include <kernel/lock.h>
|
||||
|
||||
|
|
@ -28,6 +27,17 @@ int strcmp(const char *a, const char *b)
|
|||
return *a - *b;
|
||||
}
|
||||
|
||||
int strncmp(const char *a, const char *b, size_t n)
|
||||
{
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
if (a[i] != b[i])
|
||||
return a[i] - b[i];
|
||||
if (!a[i])
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *strcpy(char *dest, const char *src)
|
||||
{
|
||||
while ((*dest++ = *src++))
|
||||
|
|
|
|||
Loading…
Reference in a new issue