diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2024-11-22 16:43:36 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2024-11-22 16:43:36 +0100 |
| commit | 224ed7b13ceadd05d27e61d3a0fdd34beb0c7745 (patch) | |
| tree | 30048a428833610202f59df64b662b27a4e5483e /kernel/initrd.c | |
| parent | 36a3989842bf813bd807a0be6ba6f6ebee684872 (diff) | |
| download | fbos-224ed7b13ceadd05d27e61d3a0fdd34beb0c7745.tar.gz fbos-224ed7b13ceadd05d27e61d3a0fdd34beb0c7745.zip | |
Fix initrd parsing because of a path change
In commit 573a8c6b490a ("usr: Rename foo/bar to fizz/buzz") the path of
the user-space binaries have changed. The `initrd` parsing code makes
some decisions based on that naming, and so it needed to be updated as
well.
Fixes: 573a8c6b490a ("usr: Rename foo/bar to fizz/buzz")
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'kernel/initrd.c')
| -rw-r--r-- | kernel/initrd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/initrd.c b/kernel/initrd.c index 4706fe8..a5c8861 100644 --- a/kernel/initrd.c +++ b/kernel/initrd.c @@ -3,7 +3,7 @@ #include <fbos/printk.h> #include <fbos/string.h> -#define BUFFER_SIZE 16 +#define BUFFER_SIZE 32 #define CPIO_HEADER_FILESIZE 54 #define CPIO_HEADER_NAMESIZE 94 @@ -53,12 +53,12 @@ __kernel uint64_t strtoul16(const char *str, size_t count) __kernel int get_task_id_from_name(const char *const name) { - if (strcmp(name, "usr/bin/foo") == 0) { - return TASK_FOO; - } else if (strcmp(name, "usr/bin/bar") == 0) { - return TASK_BAR; - } else if (strcmp(name, "usr/bin/foobar") == 0) { - return TASK_FOOBAR; + if (strcmp(name, "usr/bin/fizz") == 0) { + return TASK_FIZZ; + } else if (strcmp(name, "usr/bin/buzz") == 0) { + return TASK_BUZZ; + } else if (strcmp(name, "usr/bin/fizzbuzz") == 0) { + return TASK_FIZZBUZZ; } return TASK_UNKNOWN; } |
