summaryrefslogtreecommitdiff
path: root/src/drivers/ao_fat.c
Commit message (Collapse)AuthorAge
* altos: Use stdbool true/false instead of TRUE/FALSEKeith Packard2018-10-13
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Disable FAT commands unless requestedKeith Packard2017-04-04
| | | | | | This are debugging commands; don't provide them unless requested Signed-off-by: Keith Packard <keithp@keithp.com>
* Switch from GPLv2 to GPLv2+Keith Packard2016-07-12
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Eliminate warnings in FAT codeKeith Packard2014-02-08
| | | | | | | The FAT file system code wasn't cleaned up when the warning fixes were done recently. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Reduce stack usage of FAT driver and loggerKeith Packard2013-05-07
| | | | | | | | Move some large stack arrays to static storage. Also eliminates some printf error messages which don't seem that useful except for debugging. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Stick a mutex around FAT operationsKeith Packard2013-04-12
| | | | | | This allows the command line and logging operations to occur safely in parallel Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Support open on multiple simultaneous FAT filesKeith Packard2013-04-01
| | | | | | | Need to be able to see the contents of a log file, even if the logger is running. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make sure FAT cluster allocation works for size zero filesKeith Packard2013-04-01
| | | | | | | There were some rounding errors mis-computing the number of clusters needed, and the logic to figure out how to re-connect a chain was broken. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: let FAT tracing work in ao_fat_test as neededKeith Packard2013-04-01
| | | | | | | This allows the FAT DBG hooks to be enabled even if some other module turned DBG off. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make ao_fat_readdir return real error values instead of 1/0Keith Packard2013-03-31
| | | | | | | This way, we can distinguish between 'something bad happened' and 'you're at the end of the directory'. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix command-line FAT filename parsingKeith Packard2013-03-31
| | | | | | Pad extension with spaces Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Unmount file system after each testing pass in ao_fat_testKeith Packard2013-03-31
| | | | | | Otherwise, we use stale data and 'bad things' happen. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Don't add fat commands when building ao_fat_testKeith Packard2013-03-31
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Move fat mount information to separate command.Keith Packard2013-03-31
| | | | | | | This makes the mount report precise error information and then prints that with the 'M' command. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Export ao_fat_sync and ao_fat_full functionsKeith Packard2013-03-30
| | | | | | | ao_fat_sync() flushes the bufio data to disk along with any fsinfo changes. ao_fat_full() returns whether the file system is full. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add FAT32 support. And lots more testing.Keith Packard2013-03-29
| | | | | | | | Generalizes the FAT code to deal with either 16-bit or 32-bit versions. The testing code now runs over a variety of disk images to check for compatibility on all of them. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: seek forward on FAT cluster chain instead of restartingKeith Packard2013-03-28
| | | | | | | | This improves sequential file performance by taking advantage of any previous cached cluster/offset pair and starting from there when the cluster changes rather than starting from scratch at the begining again. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add a simple cache for the FAT position->cluster computationKeith Packard2013-03-28
| | | | | | | This improves read/write performance with large files by not re-walking the cluster chain for every operation Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clean up fat driver API. Improve fat testKeith Packard2013-03-28
| | | | | | | | Make FAT api provide reasonable error return values, change the tests to write and then read a pile of files, checking that the contents are correct (using md5sum). Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add SDCARD and FAT16 filesystem supportKeith Packard2013-03-27
This adds a fairly primitive FAT16 file system implementation along with support for SD cards. Signed-off-by: Keith Packard <keithp@keithp.com>