From: Keith Packard Date: Sun, 31 Mar 2013 19:29:37 +0000 (-0700) Subject: altos: Don't add fat commands when building ao_fat_test X-Git-Tag: altosdroid_v1.2-1~53 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=a70139c9a8a177df8f20f525703b13c0aec0fbc7 altos: Don't add fat commands when building ao_fat_test Signed-off-by: Keith Packard --- diff --git a/src/drivers/ao_fat.c b/src/drivers/ao_fat.c index ea8cdf96..bb0aa7a2 100644 --- a/src/drivers/ao_fat.c +++ b/src/drivers/ao_fat.c @@ -23,7 +23,9 @@ #include "ao_bufio.h" /* Include FAT commands */ +#ifndef AO_FAT_TEST #define FAT_COMMANDS 1 +#endif /* Spew FAT tracing */ #define FAT_TRACE 0 @@ -573,7 +575,6 @@ static uint32_t ao_file_offset; static uint32_t ao_file_cluster_offset; static cluster_t ao_file_cluster; static uint8_t ao_file_opened; -static uint8_t ao_filesystem_available; static uint8_t ao_filesystem_setup; static uint8_t ao_filesystem_status; @@ -1019,7 +1020,6 @@ int ao_fat_write(void *src, int len) { uint8_t *src_b = src; - uint32_t sector; uint16_t this_time; uint16_t offset; uint8_t *buf; @@ -1164,6 +1164,8 @@ ao_fat_readdir(uint16_t *entry, struct ao_fat_dirent *dirent) } } +#if FAT_COMMANDS + static const char *filesystem_errors[] = { [AO_FAT_FILESYSTEM_SUCCESS] = "FAT file system operating normally", [AO_FAT_FILESYSTEM_MBR_READ_FAILURE] = "MBR media read error", @@ -1331,6 +1333,8 @@ static const struct ao_cmds ao_fat_cmds[] = { { 0, NULL }, }; +#endif + void ao_fat_init(void) {