Commit Graph

8 Commits (7eaf61c04790eea930c6105175528f5353c3720e)

Author SHA1 Message Date
Christopher Haster 7eaf61c047 Fixed memory leak when files/dirs error
Error path did not clean up after itself correctly
2017-11-16 18:55:23 -06:00
Christopher Haster 9f8d0d6ae8 Merge commit '0f4e334388e0e05554a78d14d0a5ef73f02209b2' 2017-11-16 18:23:51 -06:00
Christopher Haster 785b0b4bc4 Fixed issue with aggressively rounding down lookahead configuration
The littlefs allows buffers to be passed statically in the case
that a system does not have a heap. Unfortunately, this means we
can't round up in the case of an unaligned lookahead buffer.

Double unfortunately, rounding down after clamping to the block device
size could result in a lookahead of zero for block devices < 32 blocks
large.

The assert in littlefs does catch this case, but rounding down prevents
support for < 32 block devices.

The solution is to simply require a 32-bit aligned buffer with an
assert. This avoids runtime problems while allowing a user to pass
in the correct buffer for < 32 block devices. Rounding up can be
handled at higher API levels.
2017-11-10 10:54:47 -06:00
Christopher Haster 71b429ba66 Cleaned up compilation with logging enabled
- Removed list of warnings on signedness of integers in printf
- Fixed issue with "true" in ifdef
2017-11-09 18:33:06 -06:00
Christopher Haster 72fab82453 Added API level logging and logging configuration options 2017-10-31 17:58:21 -05:00
Christopher Haster 5e4ef9f5a4 Added simple high-level thread safety
All calls are blocking, so a single mutex is able
to garuntee synchronization across all relevant functions.
2017-10-31 17:58:16 -05:00
Christopher Haster adbd0290f8 Added implementation of FileSystem::reformat 2017-10-26 17:09:56 -05:00
Christopher Haster 8fae39166b Initial commit 2017-07-12 04:40:59 -05:00