Commit Graph

12 Commits

Author SHA1 Message Date
Virgil Dupras 5eca14d49a fs: implement fsNext
This allows more than one file to be allocated. `fls` properly lists
multiple files.
2019-04-23 12:04:09 -04:00
Virgil Dupras c0dbee78de New part: fs
Very incomplete, but if you play your cards right, you can, with the
shell:

1. Create a new CFS
2. Mount it
3. Allocate a file with an arbitrary name
4. Have it listed with `fls`
2019-04-23 09:37:22 -04:00
Virgil Dupras 07fde3cab5 blockdev: move the new seek mode logic into the seek command
It wasn't a good idea to complicate all blockdev impls with complicated
seeks. Let's just stay in absolute mode for now.
2019-04-23 08:33:32 -04:00
Virgil Dupras f87cd0485a blockdev: make "seek" print out its resulting position
Also, extract commands into blockdev_cmds to avoid making blockdev
dependent on stdio.
2019-04-22 22:54:23 -04:00
Virgil Dupras 8b7faa1f02 blockdev: add "type" argument to blkSeek
Allows seeking forward, backwards, to the beginning, to the end.
2019-04-22 22:28:35 -04:00
Virgil Dupras 1bcceb949c blockdev: add Tell and fix blkGetCW
Calling on blkGetC repeatedly was somehow very unstable and often
failed. I didn't pinpoint exactly why, but keeping the call addr around
and calling that instead seems like a better idea anyway.
2019-04-22 17:15:59 -04:00
Virgil Dupras b4694225c5 blockdev: change GetC API
Instead of waiting, GetC always return immediately, with Z indicating if
something was fetched. The "wait" loop is implemented by the called (and
in the new `blkGetCW`).

This simplifies out-of-bounds verifications for storage blockdevs.
2019-04-22 14:26:16 -04:00
Virgil Dupras 21eb64f751 blockdev: remove one layer of indirection
The approach used for shell extra commands also works for blockdev. Much
simpler and tighter this way.
2019-04-16 10:17:25 -04:00
Virgil Dupras a27da6f41a add mmap part
This also introduces the "seek" shell command.
2019-04-16 08:36:26 -04:00
Virgil Dupras ce49fc15d0 blockdev: reorganize routine pointers
Also, add dummy seek reoutine.
2019-04-15 21:56:15 -04:00
Virgil Dupras c996da8ac8 shell: add error codes to cmds 2019-04-15 20:38:25 -04:00
Virgil Dupras 12c23f52e0 Add blockdev part
Also, add the ability for parts to define extra shell commands.
2019-04-15 16:53:11 -04:00