diff options
Diffstat (limited to 'src/kernel/linker')
-rw-r--r-- | src/kernel/linker/elf.c | 4 | ||||
-rw-r--r-- | src/kernel/linker/elf.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/linker/elf.c b/src/kernel/linker/elf.c index dc7481b..59f4bdd 100644 --- a/src/kernel/linker/elf.c +++ b/src/kernel/linker/elf.c @@ -31,10 +31,10 @@ thread_entry elf_load(uint8_t *data, struct process* process) { return (thread_entry)ehdr->e_entry; } -struct process* elf_exec(uint8_t *data) { +struct process* elf_exec(uint8_t *data, int privilege) { if (elf_check(data)) return 0; - struct process* p = process_new(0, 0, PL_DRIVER); + struct process* p = process_new(0, 0, privilege); thread_entry e = elf_load(data, p); diff --git a/src/kernel/linker/elf.h b/src/kernel/linker/elf.h index f84bb62..c32cce0 100644 --- a/src/kernel/linker/elf.h +++ b/src/kernel/linker/elf.h @@ -58,6 +58,6 @@ struct phdr { int elf_check(uint8_t *data); //0 if ok, 1 if not a valid ELF thread_entry elf_load(uint8_t *data, struct process* process); //Load an ELF to a process, return entry point -struct process* elf_exec(uint8_t *data); //Creates a new process and a thread for running ELF file +struct process* elf_exec(uint8_t *data, int privilege); //Creates a new process and a thread for running ELF file #endif |