diff options
author | Christopher Haster <chaster@utexas.edu> | 2017-09-25 02:20:52 +0300 |
---|---|---|
committer | Christopher Haster <chaster@utexas.edu> | 2017-10-10 13:05:26 +0300 |
commit | 9db1a86498250ad078eadc7315f02b24e1a4e9a3 (patch) | |
tree | 2dca3a8eb38fd76a4193dcb479268dd8f68de9da /lfs_util.h | |
parent | 984340225befc1e2330dd3b88f4048373eda0fce (diff) |
Added specification document
For covering all the technical bits
Diffstat (limited to 'lfs_util.h')
-rw-r--r-- | lfs_util.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -12,7 +12,8 @@ #include <stdio.h> -// Builtin functions +// Builtin functions, these may be replaced by more +// efficient implementations in the system static inline uint32_t lfs_max(uint32_t a, uint32_t b) { return (a > b) ? a : b; } @@ -33,10 +34,12 @@ static inline int lfs_scmp(uint32_t a, uint32_t b) { return (int)(unsigned)(a - b); } +// CRC-32 with polynomial = 0x04c11db7 void lfs_crc(uint32_t *crc, const void *buffer, size_t size); -// Logging functions +// Logging functions, these may be replaced by system-specific +// logging functions #define LFS_DEBUG(fmt, ...) printf("lfs debug: " fmt "\n", __VA_ARGS__) #define LFS_WARN(fmt, ...) printf("lfs warn: " fmt "\n", __VA_ARGS__) #define LFS_ERROR(fmt, ...) printf("lfs error: " fmt "\n", __VA_ARGS__) |