Commit graph

14 commits

Author SHA1 Message Date
Sam Tebbs
426eb13d46 Add VFS syscalls 2023-01-19 22:09:48 +00:00
Kyle Aleshire
06f45400bd Update source tree for zig 0.9.1 2022-03-06 15:22:34 +00:00
DrDeano
4afecd6508
See description
Added finding the next free cluster
Added name to long name
Added long name to short name
Added tests for above

Added createLongNameEntry + tests

Moved tests to bottom

Added createShortNameEntry + test

Used the RTC for the date and time for the created short entry

Tidied createEntries


A bit of refactor

No symlinks for FAT32

findNextFreeCluster updates FAT

Reordered tests to better follow the FAT32FS code
FAT32 has no support for symlinks, so removed code around this.
Removed open_args from createNode as it doesn't need it

Added writeEntries + tests

Write the short and long entries to disk
findNextFreeCluster update cluster chain with parent cluster

Added FAT32 write + tests

This Added the ability to create files and directories and write to files.
Added location of the short dir entry for the file so can update the size of the file on disk
Added folders to the test FAT32 directory.
Also fixed minor bug in mkfat32

Added check for destroying the filesystem


Fixed error message for cluster size


Simpler if condition


0x0FFFFFFF => 0xFFFFFFFF


Spelling


Fixed test
2021-01-04 08:50:20 +00:00
DrDeano
d32c52b13b
SymlinkNode + umount + closeing dir path
Added a symlink node so can close a open symlink.
Added umount to can unmount a directory.
Closes open directories while traversing the path.
Closes #277
2021-01-02 23:02:54 +00:00
DrDeano
0497beb5c6
Added the ability to close a directory node
Updated docs
Closes #270


Update doc comment


Moved close to closeFile and closeDir in VFS


Moved back to @ptrCast()


Always forget to format


Added TODO comment
2020-12-07 22:45:28 +00:00
DrDeano
d5de173fd3
Add a quick format option for mkfat32
Added open implementation

Needed to return a pointer to the file system as `@fieldParentPtr(Fat32Self, "instance", fs.instance)` doesn't work as the the pointer to `instance` is on the stack, then goes out of scope when the init is returned. So will be using free stack space.
Part of #216

Spelling, doc comments and extra test for open file


init -> create, deinit -> destroy
2020-12-07 18:29:16 +00:00
Sam Tebbs
307ea7a52e Add user mode 2020-11-07 09:00:10 +00:00
Sam Tebbs
1453540bae Add symlink support 2020-11-05 18:21:13 +00:00
iamgweej
e96c3165a2 Converted Read and Write from silce returning to slice accepting 2020-10-26 17:38:54 +00:00
iamgweej
24a5e7c135 Minor change: reorder destroy() and deinit() 2020-08-29 18:33:45 +03:00
Sam Tebbs
b7c3084f09 Fix for TailQueue and std.log changes 2020-08-23 14:42:56 +01:00
iamgweej
34bc8d0ae1 Added file closing in VFS functions 2020-08-16 11:43:29 +01:00
Sam Tebbs
95885f4407 Add new parameters for resize and alloc 2020-08-15 21:35:31 +01:00
DrDeano
7b5f921d9f
File system files to new folder and use FixedBufferStream for initrd
Fixed non-header aligned sizes

When allocating a size that isn't aligned to the Header, then we get a incorrect alignment.
To fix this, added additional alignment padding to the next free header.

Fixed adding strings to build options
2020-08-06 18:13:53 +01:00
Renamed from src/kernel/vfs.zig (Browse further)