altos: Report total available log space in version command
authorKeith Packard <keithp@keithp.com>
Tue, 10 Jun 2014 16:37:43 +0000 (09:37 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 10 Jun 2014 16:38:53 +0000 (09:38 -0700)
This provides a more accurate means of determining available log space
than guessing whether some portion of the flash chip holds
configuration data.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/cc1111/ao_pins.h
src/kernel/ao_cmd.c

index 298d6acc0a3f184d05f8759311fe81a4ca3e3964..2b19f1f6b4bc20f986443c904e400f6f171f871a 100644 (file)
@@ -18,7 +18,8 @@
 #ifndef _AO_PINS_H_
 #define _AO_PINS_H_
 
-#define HAS_RADIO      1
+#define HAS_RADIO              1
+#define DISABLE_LOG_SPACE      1
 
 #if defined(TELEMETRUM_V_1_0)
        /* Discontinued and was never built with CC1111 chips needing this */
index 69372fed0268799d9be65b78f095ca9630ccae00..5d8683e132da42ab3a3a3c35419bc456e1604106 100644 (file)
@@ -283,6 +283,9 @@ version(void)
 #endif
 #if HAS_LOG
               "log-format       %u\n"
+#if !DISABLE_LOG_SPACE
+              "log-space        %lu\n"
+#endif
 #endif
 #if defined(AO_BOOT_APPLICATION_BASE) && defined(AO_BOOT_APPLICATION_BOUND)
               "program-space    %u\n"
@@ -295,6 +298,9 @@ version(void)
 #endif
 #if HAS_LOG
               , ao_log_format
+#if !DISABLE_LOG_SPACE
+              , (unsigned long) ao_storage_log_max
+#endif
 #endif
 #if defined(AO_BOOT_APPLICATION_BASE) && defined(AO_BOOT_APPLICATION_BOUND)
               , (uint32_t) AO_BOOT_APPLICATION_BOUND - (uint32_t) AO_BOOT_APPLICATION_BASE