Commit graph

21 commits

Author SHA1 Message Date
Yann MAGNIN
7ff93e79f0
fygue: switch tabs to spaces :) 2025-04-12 08:47:17 +02:00
Yann MAGNIN
ec6f7cedc5
fygue: fix read() + fix broken sync() + fix path handling + fix file stat() + various other fixes 2025-04-10 23:40:59 +02:00
Yann MAGNIN
8156c8437b
fygue: merge dev branch that add FXCP400 file IO support 2025-04-08 18:12:52 +02:00
Lephe
8e64a8a107
fs: fx-CP 400 fixes, still unreliable when writing as previously known 2025-04-06 15:54:44 +02:00
Lephe
7180b52fd4
fs: first steps towards working fx-CP 400 support (compiles, no syscalls) 2025-04-05 08:34:08 +02:00
Yann MAGNIN
b40a6b3fa8
fs: prepare Fygue integration 2025-04-01 21:06:55 +02:00
Yann MAGNIN
968588bac3
fugue: manually handle world-switch 2025-04-01 16:12:09 +02:00
Lephe
ae3250edd0
fs readdir: fix handling of BFile_Type_MainMem entries
These are g*m files, not the @MainMem folder.
2024-08-04 07:55:14 +02:00
Lephe
a45135776a
fs readdir: recognize a few more bfile types 2024-07-27 21:49:01 +02:00
Lephe
542b4f0a81
fs: fix fugue_dir_explore() error not propagating to open() 2024-02-04 18:50:37 +01:00
Lephe
1e220af616
fs: fix incorrect OoM handling in fugue_dir_explore()
Non-NULL dp would be returned by alloc failure path despite having been
freed.
2024-02-04 18:17:41 +01:00
Lephe
9924dc4684
fs: add rename() function on fx-CG 2022-08-22 15:25:14 +02:00
Lephe
f300338a57
fs: fix tracking of initial position with O_APPEND (*)
(*) O_APPEND is *not* functional yet, this is just a hack for write-only
streams. Currently O_APPEND does not reposition the cursor at the end of
the file before every write.
2022-03-19 19:26:23 +00:00
Lephe
227c06631b
fs: buffer Fugue writes through RAM
Writing from ROM causes occasional crashes, which are fairly hard to
produce when the buffers are small.
2022-01-10 14:47:14 +01:00
Lephe
8aea762e7a
fs: use a static variable in calls to BFile_Create()
There is no evidence that BFile_Create() keeps the address and writes
to it later on, but I'd rather be overly careful than have to debug a
stack corruption problem in half a year :)
2022-01-10 13:38:28 +01:00
Lephe
3aa1471ac5
fs: track offset of Fugue files manually
This helped locate some bugs:
* read() could read past EOF due to BFile_Read() allowing you to read up
  until the end of the last sector, beyond the file size
* pread() did not restore the file offset because the negative seek at
  the end is not relative (that was the CASIOWIN fs API), so pread()
  could not actually be written without knowing the current position
* lseek() would clamp you to EOF but still return its out-of-bounds
  arguments, as a direct result of BFile_Seek() doing that

Benefits:
* Made pread() a generic function
2022-01-06 14:05:52 +01:00
Lephe
b549fd68ba
fs: stat(), proper unlink(), rmdir() 2021-12-30 18:17:13 +01:00
Lephe
aed90d9b3c
fs: folder support, part 2 (path normalization and root) 2021-12-23 01:19:45 +01:00
Lephe
9cae0040b5
fs: folder support, part 1 (mkdir/rmdir and the opendir(3) family) 2021-12-21 19:01:00 +01:00
Lephe
34c73ba0ba
fs: fix include path for bfile.h 2021-12-15 13:32:39 +01:00
Lephe
6903bd58d5
fs: cast BFile support into generic file descriptors
This paves the way for standard streams, USB streams, and some more.
2021-12-13 18:38:47 +01:00