Browse Source

env: Rename some other getenv()-related functions

We are now using an env_ prefix for environment functions. Rename these
other functions as well, for consistency:

   getenv_vlan()
   getenv_bootm_size()
   getenv_bootm_low()
   getenv_bootm_mapsize()
   env_get_default()

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass 6 years ago
parent
commit
723806cc5b
41 changed files with 85 additions and 85 deletions
  1. 4 4
      arch/powerpc/lib/bootm.c
  2. 2 2
      board/Arcturus/ucp1020/ucp1020.c
  3. 2 2
      board/freescale/b4860qds/b4860qds.c
  4. 2 2
      board/freescale/bsc9131rdb/bsc9131rdb.c
  5. 2 2
      board/freescale/bsc9132qds/bsc9132qds.c
  6. 2 2
      board/freescale/c29xpcie/c29xpcie.c
  7. 2 2
      board/freescale/corenet_ds/corenet_ds.c
  8. 2 2
      board/freescale/mpc8572ds/mpc8572ds.c
  9. 2 2
      board/freescale/p1010rdb/p1010rdb.c
  10. 2 2
      board/freescale/p1022ds/p1022ds.c
  11. 2 2
      board/freescale/p1023rdb/p1023rdb.c
  12. 2 2
      board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
  13. 2 2
      board/freescale/p1_twr/p1_twr.c
  14. 2 2
      board/freescale/p2041rdb/p2041rdb.c
  15. 2 2
      board/freescale/t102xqds/t102xqds.c
  16. 2 2
      board/freescale/t102xrdb/t102xrdb.c
  17. 2 2
      board/freescale/t1040qds/t1040qds.c
  18. 2 2
      board/freescale/t104xrdb/t104xrdb.c
  19. 2 2
      board/freescale/t208xqds/t208xqds.c
  20. 2 2
      board/freescale/t208xrdb/t208xrdb.c
  21. 2 2
      board/freescale/t4qds/t4240emu.c
  22. 2 2
      board/freescale/t4qds/t4240qds.c
  23. 2 2
      board/freescale/t4rdb/t4240rdb.c
  24. 2 2
      board/gdsys/p1022/controlcenterd.c
  25. 2 2
      board/keymile/kmp204x/kmp204x.c
  26. 2 2
      board/varisys/cyrus/cyrus.c
  27. 1 1
      cmd/elf.c
  28. 3 3
      cmd/mtdparts.c
  29. 1 1
      cmd/net.c
  30. 2 2
      common/bootm.c
  31. 2 2
      common/image-fdt.c
  32. 9 9
      common/image.c
  33. 3 3
      drivers/net/netconsole.c
  34. 1 1
      env/common.c
  35. 1 1
      env/flags.c
  36. 1 1
      include/common.h
  37. 1 1
      include/environment.h
  38. 3 3
      include/image.h
  39. 1 1
      include/net.h
  40. 1 1
      net/link_local.c
  41. 1 1
      net/net.c

+ 4 - 4
arch/powerpc/lib/bootm.c

@@ -86,7 +86,7 @@ static void boot_jump_linux(bootm_headers_t *images)
 		debug ("   Booting using OF flat tree...\n");
 		WATCHDOG_RESET ();
 		(*kernel) ((bd_t *)of_flat_tree, 0, 0, EPAPR_MAGIC,
-			   getenv_bootm_mapsize(), 0, 0);
+			   env_get_bootm_mapsize(), 0, 0);
 		/* does not return */
 	} else
 #endif
@@ -121,8 +121,8 @@ void arch_lmb_reserve(struct lmb *lmb)
 	phys_size_t bootm_size;
 	ulong size, sp, bootmap_base;
 
-	bootmap_base = getenv_bootm_low();
-	bootm_size = getenv_bootm_size();
+	bootmap_base = env_get_bootm_low();
+	bootm_size = env_get_bootm_size();
 
 #ifdef DEBUG
 	if (((u64)bootmap_base + bootm_size) >
@@ -340,6 +340,6 @@ void boot_jump_vxworks(bootm_headers_t *images)
 
 	((void (*)(void *, ulong, ulong, ulong,
 		ulong, ulong, ulong))images->ep)(images->ft_addr,
-		0, 0, EPAPR_MAGIC, getenv_bootm_mapsize(), 0, 0);
+		0, 0, EPAPR_MAGIC, env_get_bootm_mapsize(), 0, 0);
 }
 #endif

+ 2 - 2
board/Arcturus/ucp1020/ucp1020.c

@@ -307,8 +307,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/freescale/b4860qds/b4860qds.c

@@ -1197,8 +1197,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/freescale/bsc9131rdb/bsc9131rdb.c

@@ -65,8 +65,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 #ifdef CONFIG_FDT_FIXUP_PARTITIONS

+ 2 - 2
board/freescale/bsc9132qds/bsc9132qds.c

@@ -370,8 +370,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	#if defined(CONFIG_PCI)
 	FT_FSL_PCI_SETUP;

+ 2 - 2
board/freescale/c29xpcie/c29xpcie.c

@@ -138,8 +138,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 #if defined(CONFIG_PCI)
 	FT_FSL_PCI_SETUP;

+ 2 - 2
board/freescale/corenet_ds/corenet_ds.c

@@ -191,8 +191,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/freescale/mpc8572ds/mpc8572ds.c

@@ -239,8 +239,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/freescale/p1010rdb/p1010rdb.c

@@ -453,8 +453,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 #if defined(CONFIG_PCI)
 	FT_FSL_PCI_SETUP;

+ 2 - 2
board/freescale/p1022ds/p1022ds.c

@@ -339,8 +339,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/freescale/p1023rdb/p1023rdb.c

@@ -137,8 +137,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c

@@ -439,8 +439,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/freescale/p1_twr/p1_twr.c

@@ -268,8 +268,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/freescale/p2041rdb/p2041rdb.c

@@ -219,8 +219,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/freescale/t102xqds/t102xqds.c

@@ -363,8 +363,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/freescale/t102xrdb/t102xrdb.c

@@ -186,8 +186,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/freescale/t1040qds/t1040qds.c

@@ -245,8 +245,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/freescale/t104xrdb/t104xrdb.c

@@ -132,8 +132,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/freescale/t208xqds/t208xqds.c

@@ -451,8 +451,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/freescale/t208xrdb/t208xrdb.c

@@ -118,8 +118,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/freescale/t4qds/t4240emu.c

@@ -70,8 +70,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/freescale/t4qds/t4240qds.c

@@ -684,8 +684,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/freescale/t4rdb/t4240rdb.c

@@ -97,8 +97,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/gdsys/p1022/controlcenterd.c

@@ -335,8 +335,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/keymile/kmp204x/kmp204x.c

@@ -271,8 +271,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 2 - 2
board/varisys/cyrus/cyrus.c

@@ -87,8 +87,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	ft_cpu_setup(blob, bd);
 
-	base = getenv_bootm_low();
-	size = getenv_bootm_size();
+	base = env_get_bootm_low();
+	size = env_get_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
 

+ 1 - 1
cmd/elf.c

@@ -300,7 +300,7 @@ int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 				ptr += sprintf(build_buf + ptr, "e=%s", tmp);
 				tmp = env_get("netmask");
 				if (tmp) {
-					u32 mask = getenv_ip("netmask").s_addr;
+					u32 mask = env_get_ip("netmask").s_addr;
 					ptr += sprintf(build_buf + ptr,
 						       ":%08x ", ntohl(mask));
 				} else {

+ 3 - 3
cmd/mtdparts.c

@@ -1533,7 +1533,7 @@ static int spread_partitions(void)
  * @param buf temporary buffer pointer MTDPARTS_MAXLEN long
  * @return mtdparts variable string, NULL if not found
  */
-static const char *getenv_mtdparts(char *buf)
+static const char *env_get_mtdparts(char *buf)
 {
 	if (gd->flags & GD_FLG_ENV_READY)
 		return env_get("mtdparts");
@@ -1565,7 +1565,7 @@ static int parse_mtdparts(const char *const mtdparts)
 	}
 
 	/* re-read 'mtdparts' variable, mtd_devices_init may be updating env */
-	p = getenv_mtdparts(tmp_parts);
+	p = env_get_mtdparts(tmp_parts);
 	if (!p)
 		p = mtdparts;
 
@@ -1742,7 +1742,7 @@ int mtdparts_init(void)
 
 	/* get variables */
 	ids = env_get("mtdids");
-	parts = getenv_mtdparts(tmp_parts);
+	parts = env_get_mtdparts(tmp_parts);
 	current_partition = env_get("partition");
 
 	/* save it for later parsing, cannot rely on current partition pointer

+ 1 - 1
cmd/net.c

@@ -331,7 +331,7 @@ int do_sntp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	char *toff;
 
 	if (argc < 2) {
-		net_ntp_server = getenv_ip("ntpserverip");
+		net_ntp_server = env_get_ip("ntpserverip");
 		if (net_ntp_server.s_addr == 0) {
 			printf("ntpserverip not set\n");
 			return CMD_RET_FAILURE;

+ 2 - 2
common/bootm.c

@@ -55,8 +55,8 @@ static void boot_start_lmb(bootm_headers_t *images)
 
 	lmb_init(&images->lmb);
 
-	mem_start = getenv_bootm_low();
-	mem_size = getenv_bootm_size();
+	mem_start = env_get_bootm_low();
+	mem_size = env_get_bootm_size();
 
 	lmb_add(&images->lmb, (phys_addr_t)mem_start, mem_size);
 

+ 2 - 2
common/image-fdt.c

@@ -156,8 +156,8 @@ int boot_relocate_fdt(struct lmb *lmb, char **of_flat_tree, ulong *of_size)
 	} else {
 		of_start =
 		    (void *)(ulong) lmb_alloc_base(lmb, of_len, 0x1000,
-						   getenv_bootm_mapsize()
-						   + getenv_bootm_low());
+						   env_get_bootm_mapsize()
+						   + env_get_bootm_low());
 	}
 
 	if (of_start == NULL) {

+ 9 - 9
common/image.c

@@ -465,7 +465,7 @@ static int on_loadaddr(const char *name, const char *value, enum env_op op,
 }
 U_BOOT_ENV_CALLBACK(loadaddr, on_loadaddr);
 
-ulong getenv_bootm_low(void)
+ulong env_get_bootm_low(void)
 {
 	char *s = env_get("bootm_low");
 	if (s) {
@@ -482,7 +482,7 @@ ulong getenv_bootm_low(void)
 #endif
 }
 
-phys_size_t getenv_bootm_size(void)
+phys_size_t env_get_bootm_size(void)
 {
 	phys_size_t tmp, size;
 	phys_addr_t start;
@@ -509,7 +509,7 @@ phys_size_t getenv_bootm_size(void)
 	return size - (tmp - start);
 }
 
-phys_size_t getenv_bootm_mapsize(void)
+phys_size_t env_get_bootm_mapsize(void)
 {
 	phys_size_t tmp;
 	char *s = env_get("bootm_mapsize");
@@ -521,7 +521,7 @@ phys_size_t getenv_bootm_mapsize(void)
 #if defined(CONFIG_SYS_BOOTMAPSZ)
 	return CONFIG_SYS_BOOTMAPSZ;
 #else
-	return getenv_bootm_size();
+	return env_get_bootm_size();
 #endif
 }
 
@@ -1233,7 +1233,7 @@ int boot_ramdisk_high(struct lmb *lmb, ulong rd_data, ulong rd_len,
 		if (initrd_high == ~0)
 			initrd_copy_to_ram = 0;
 	} else {
-		initrd_high = getenv_bootm_mapsize() + getenv_bootm_low();
+		initrd_high = env_get_bootm_mapsize() + env_get_bootm_low();
 	}
 
 
@@ -1506,7 +1506,7 @@ int boot_get_loadable(int argc, char * const argv[], bootm_headers_t *images,
  * @cmd_end: pointer to a ulong variable, will hold cmdline end
  *
  * boot_get_cmdline() allocates space for kernel command line below
- * BOOTMAPSZ + getenv_bootm_low() address. If "bootargs" U-Boot environemnt
+ * BOOTMAPSZ + env_get_bootm_low() address. If "bootargs" U-Boot environemnt
  * variable is present its contents is copied to allocated kernel
  * command line.
  *
@@ -1520,7 +1520,7 @@ int boot_get_cmdline(struct lmb *lmb, ulong *cmd_start, ulong *cmd_end)
 	char *s;
 
 	cmdline = (char *)(ulong)lmb_alloc_base(lmb, CONFIG_SYS_BARGSIZE, 0xf,
-				getenv_bootm_mapsize() + getenv_bootm_low());
+				env_get_bootm_mapsize() + env_get_bootm_low());
 
 	if (cmdline == NULL)
 		return -1;
@@ -1547,7 +1547,7 @@ int boot_get_cmdline(struct lmb *lmb, ulong *cmd_start, ulong *cmd_end)
  * @kbd: double pointer to board info data
  *
  * boot_get_kbd() allocates space for kernel copy of board info data below
- * BOOTMAPSZ + getenv_bootm_low() address and kernel board info is initialized
+ * BOOTMAPSZ + env_get_bootm_low() address and kernel board info is initialized
  * with the current u-boot board info data.
  *
  * returns:
@@ -1557,7 +1557,7 @@ int boot_get_cmdline(struct lmb *lmb, ulong *cmd_start, ulong *cmd_end)
 int boot_get_kbd(struct lmb *lmb, bd_t **kbd)
 {
 	*kbd = (bd_t *)(ulong)lmb_alloc_base(lmb, sizeof(bd_t), 0xf,
-				getenv_bootm_mapsize() + getenv_bootm_low());
+				env_get_bootm_mapsize() + env_get_bootm_low());
 	if (*kbd == NULL)
 		return -1;
 

+ 3 - 3
drivers/net/netconsole.c

@@ -62,8 +62,8 @@ static int is_broadcast(struct in_addr ip)
 
 	/* update only when the environment has changed */
 	if (env_changed_id != env_id) {
-		netmask = getenv_ip("netmask");
-		our_ip = getenv_ip("ipaddr");
+		netmask = env_get_ip("netmask");
+		our_ip = env_get_ip("ipaddr");
 
 		env_changed_id = env_id;
 	}
@@ -83,7 +83,7 @@ static int refresh_settings_from_env(void)
 	/* update only when the environment has changed */
 	if (env_changed_id != env_id) {
 		if (env_get("ncip")) {
-			nc_ip = getenv_ip("ncip");
+			nc_ip = env_get_ip("ncip");
 			if (!nc_ip.s_addr)
 				return -1;	/* ncip is 0.0.0.0 */
 			p = strchr(env_get("ncip"), ':');

+ 1 - 1
env/common.c

@@ -44,7 +44,7 @@ int env_get_yesno(const char *var)
 /*
  * Look up the variable from the default environment
  */
-char *getenv_default(const char *name)
+char *env_get_default(const char *name)
 {
 	char *ret_val;
 	unsigned long really_valid = gd->env_valid;

+ 1 - 1
env/flags.c

@@ -541,7 +541,7 @@ int env_flags_validate(const ENTRY *item, const char *newval, enum env_op op,
 			return 1;
 		} else if (item->flags &
 		    ENV_FLAGS_VARACCESS_PREVENT_NONDEF_OVERWR) {
-			const char *defval = getenv_default(name);
+			const char *defval = env_get_default(name);
 
 			if (defval == NULL)
 				defval = "";

+ 1 - 1
include/common.h

@@ -749,7 +749,7 @@ int zzip(void *dst, unsigned long *lenp, unsigned char *src,
 
 /* lib/net_utils.c */
 #include <net.h>
-static inline struct in_addr getenv_ip(char *var)
+static inline struct in_addr env_get_ip(char *var)
 {
 	return string_to_ip(env_get(var));
 }

+ 1 - 1
include/environment.h

@@ -282,7 +282,7 @@ extern struct hsearch_data env_htab;
 void env_crc_update(void);
 
 /* Look up the variable from the default environment */
-char *getenv_default(const char *name);
+char *env_get_default(const char *name);
 
 /* [re]set to the default environment */
 void set_default_env(const char *s);

+ 3 - 3
include/image.h

@@ -769,9 +769,9 @@ static inline void image_set_name(image_header_t *hdr, const char *name)
 int image_check_hcrc(const image_header_t *hdr);
 int image_check_dcrc(const image_header_t *hdr);
 #ifndef USE_HOSTCC
-ulong getenv_bootm_low(void);
-phys_size_t getenv_bootm_size(void);
-phys_size_t getenv_bootm_mapsize(void);
+ulong env_get_bootm_low(void);
+phys_size_t env_get_bootm_size(void);
+phys_size_t env_get_bootm_mapsize(void);
 #endif
 void memmove_wd(void *to, void *from, size_t len, ulong chunksz);
 

+ 1 - 1
include/net.h

@@ -834,7 +834,7 @@ void vlan_to_string(ushort x, char *s);
 ushort string_to_vlan(const char *s);
 
 /* read a VLAN id from an environment variable */
-ushort getenv_vlan(char *);
+ushort env_get_vlan(char *);
 
 /* copy a filename (allow for "..." notation, limit length) */
 void copy_filename(char *dst, const char *src, int size);

+ 1 - 1
net/link_local.c

@@ -104,7 +104,7 @@ static void configure_wait(void)
 
 void link_local_start(void)
 {
-	ip = getenv_ip("llipaddr");
+	ip = env_get_ip("llipaddr");
 	if (ip.s_addr != 0 &&
 	    (ntohl(ip.s_addr) & IN_CLASSB_NET) != LINKLOCAL_ADDR) {
 		puts("invalid link address");

+ 1 - 1
net/net.c

@@ -1536,7 +1536,7 @@ ushort string_to_vlan(const char *s)
 	return htons(id);
 }
 
-ushort getenv_vlan(char *var)
+ushort env_get_vlan(char *var)
 {
 	return string_to_vlan(env_get(var));
 }