diff options
| author | Keith Packard <keithp@keithp.com> | 2013-04-30 18:57:53 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2013-05-07 20:08:00 -0700 |
| commit | ac72d1c298fc553808a8e04a65482d4990f177d7 (patch) | |
| tree | faf4932fe2d9efca88b306a2097dc8233a49301f /src/drivers/ao_log_fat.c | |
| parent | df70e3e87874d80516c6d43cfe745d511d54f206 (diff) | |
altos: Reduce stack usage of FAT driver and logger
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>
Diffstat (limited to 'src/drivers/ao_log_fat.c')
| -rw-r--r-- | src/drivers/ao_log_fat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/ao_log_fat.c b/src/drivers/ao_log_fat.c index af77401c..45b67012 100644 --- a/src/drivers/ao_log_fat.c +++ b/src/drivers/ao_log_fat.c @@ -27,7 +27,7 @@ static uint8_t log_mutex; static void ao_log_open(void) { - char name[12]; + static char name[12]; int8_t status; sprintf(name,"%04d%02d%02dLOG", 2000 + log_year, log_month, log_day); @@ -38,7 +38,7 @@ ao_log_open(void) log_open = 1; } else if (status == -AO_FAT_ENOENT) { status = ao_fat_creat(name); - if (status == AO_FAT_SUCCESS) { + if (status >= 0) { log_fd = status; log_open = 1; } |
