mirror of
https://github.com/drasko/codezero.git
synced 2026-01-18 13:53:16 +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:
@@ -56,7 +56,7 @@ struct memfs_inode {
|
||||
u64 mtime; /* Last content modification */
|
||||
u64 ctime; /* Last inode modification */
|
||||
u64 size; /* Size of contents */
|
||||
void *block[5]; /* Number of blocks */
|
||||
void *block[MEMFS_FMAX_BLOCKS]; /* Number of blocks */
|
||||
};
|
||||
|
||||
struct memfs_superblock {
|
||||
|
||||
Reference in New Issue
Block a user