mirror of
https://github.com/drasko/codezero.git
synced 2026-02-05 06:23:15 +01:00
More progress on parsing elf files. Fixes to memfs file read/write
Increased inode block pointers to 40. The current maximum allowed (and checked). Updates to file size after every file write ensures subsequent writes can correctly operate using updated file size information (i.e. not try to add more pages that are already present). We cannot do this inside write() because directory writes rely on byte-granularity updates on file buffers, whereas file updates are by page-granularity (currently).
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include <user.h>
|
||||
#include <task.h>
|
||||
#include <exit.h>
|
||||
#include <lib/elf/elf.h>
|
||||
|
||||
/*
|
||||
* Different from vfs_open(), which validates an already opened
|
||||
@@ -78,8 +79,7 @@ int task_setup_from_executable(struct vm_file *vmfile, struct tcb *task,
|
||||
{
|
||||
memset(efd, 0, sizeof(*efd));
|
||||
|
||||
return elf_parse_executable(task, vmfile, efd,
|
||||
pager_map_page, pager_unmap_page);
|
||||
return elf_parse_executable(task, vmfile, efd);
|
||||
}
|
||||
|
||||
int do_execve(struct tcb *sender, char *filename)
|
||||
|
||||
Reference in New Issue
Block a user