#include "common.h"
#include <string.h>
#include <stdlib.h>
+#include <stdbool.h>
#include <avr/eeprom.h>
#include "config.h"
}
+/*
+ * Read an environment variable as a boolean
+ */
+bool getenv_yesno(const MEMX char *name)
+{
+ char *s = getenv_char(name);
+
+ if (s == NULL)
+ return false;
+
+ return strchr_P(PSTR("1yYtT"), *s) != NULL;
+
+/*
+ return *s == '1' || *s == 'y' || *s == 'Y' || *s == 't' || *s == 'T' ?
+ 1 : 0;
+*/
+}
+
command_ret_t do_env_print(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
command_ret_t rc = CMD_RET_SUCCESS;