summaryrefslogtreecommitdiff
path: root/src/drivers/ao_fat.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-03-31 12:29:37 -0700
committerKeith Packard <keithp@keithp.com>2013-03-31 12:29:37 -0700
commita70139c9a8a177df8f20f525703b13c0aec0fbc7 (patch)
tree405bc3493a68fdf02a5c11f3bdae3ba8b8d0776a /src/drivers/ao_fat.c
parent8b2f211758dfa97230a730b8c4b31e0e711c19c9 (diff)
altos: Don't add fat commands when building ao_fat_test
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/drivers/ao_fat.c')
-rw-r--r--src/drivers/ao_fat.c8
1 files changed, 6 insertions, 2 deletions
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)
{