summaryrefslogtreecommitdiff
path: root/avr
diff options
context:
space:
mode:
authorLeo C2016-06-17 15:46:30 +0200
committerLeo C2016-06-17 20:52:19 +0200
commitbddc7e77b0de0cfd5e7e98f8915552c2c83edb9f (patch)
treeeb6eb372ceade1017af496b3f47b8919545eaabc /avr
parent4912667be3154f62d3206a47b6e748b0b6281ae3 (diff)
downloadz180-stamp-bddc7e77b0de0cfd5e7e98f8915552c2c83edb9f.zip
Rename getenv_char() --> getenv_str()
Diffstat (limited to 'avr')
-rw-r--r--avr/cli.c4
-rw-r--r--avr/cmd_gpio.c2
-rw-r--r--avr/cmd_loadcpm3.c2
-rw-r--r--avr/cmd_run.c2
-rw-r--r--avr/env.c4
-rw-r--r--avr/main.c2
6 files changed, 8 insertions, 8 deletions
diff --git a/avr/cli.c b/avr/cli.c
index 1a26206..77876af 100644
--- a/avr/cli.c
+++ b/avr/cli.c
@@ -177,7 +177,7 @@ char *process_macros(char *input, char *output)
if (c == '}') {
/* Terminate variable name */
*(inp-1) = '\0';
- const char *envval = getenv_char(varname);
+ const char *envval = getenv_str(varname);
*(inp-1) = '}';
/* Copy into the line if it exists */
if (envval != NULL)
@@ -210,7 +210,7 @@ char *process_macros(char *input, char *output)
* WARNING:
*
* We must create a temporary copy of the command since the command we get
- * may be the result from getenv_char(), which returns a pointer directly to
+ * may be the result from getenv_str(), which returns a pointer directly to
* the environment data, which may change magicly when the command we run
* creates or modifies environment variables (like "bootp" does).
*
diff --git a/avr/cmd_gpio.c b/avr/cmd_gpio.c
index d3ef716..5cc02d0 100644
--- a/avr/cmd_gpio.c
+++ b/avr/cmd_gpio.c
@@ -37,7 +37,7 @@ static void pinnames_get(void)
/* TODO: enters endless loop on wrong parameters */
- if ((lp = getenv_char(PSTR(ENV_PINALIAS))) != NULL) {
+ if ((lp = getenv_str(PSTR(ENV_PINALIAS))) != NULL) {
pin_names[namestr] = strdup(lp);
ptr = strtok_P(pin_names[namestr], delim1);
while (ptr != NULL) {
diff --git a/avr/cmd_loadcpm3.c b/avr/cmd_loadcpm3.c
index 6b2f62f..02ec47f 100644
--- a/avr/cmd_loadcpm3.c
+++ b/avr/cmd_loadcpm3.c
@@ -92,7 +92,7 @@ command_ret_t do_loadcpm3(cmd_tbl_t *cmdtp, int flag, int argc, char * const arg
if (argc > 2)
common_base = strtoul(argv[2], NULL, 16);
- fname = getenv_char(PSTR(ENV_CPM3_SYSFILE));
+ fname = getenv_str(PSTR(ENV_CPM3_SYSFILE));
if (argc > 1) {
fname = argv[1];
}
diff --git a/avr/cmd_run.c b/avr/cmd_run.c
index 97d39d1..8593ef5 100644
--- a/avr/cmd_run.c
+++ b/avr/cmd_run.c
@@ -27,7 +27,7 @@ command_ret_t do_run(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
for (i = 1; i < argc; ++i) {
char *arg;
- arg = getenv_char(argv[i]);
+ arg = getenv_str(argv[i]);
if (arg == NULL) {
printf_P(PSTR("## Error: \"%s\" is not set\n"), argv[i]);
return CMD_RET_FAILURE;
diff --git a/avr/env.c b/avr/env.c
index f067940..952c88a 100644
--- a/avr/env.c
+++ b/avr/env.c
@@ -318,7 +318,7 @@ int env_init(void)
}
-char *getenv_char(const MEMX char *name)
+char *getenv_str(const MEMX char *name)
{
env_item_t *ep;
char *ret = NULL;
@@ -631,7 +631,7 @@ unsigned long getenv_ulong(const MEMX char *name, int base, unsigned long defaul
*/
bool getenv_yesno(const MEMX char *name)
{
- char *s = getenv_char(name);
+ char *s = getenv_str(name);
if (s == NULL)
return false;
diff --git a/avr/main.c b/avr/main.c
index 423b48a..86dcc50 100644
--- a/avr/main.c
+++ b/avr/main.c
@@ -223,7 +223,7 @@ const char *bootdelay_process(void)
debug("### main_loop entered: bootdelay=%d\n\n", bootdelay);
_delay_ms(20);
- s = getenv_char(PSTR(ENV_BOOTCMD));
+ s = getenv_str(PSTR(ENV_BOOTCMD));
stored_bootdelay = bootdelay;
return s;
}