Skip to content

Commit

Permalink
env: Move env_get_hex() to env.h
Browse files Browse the repository at this point in the history
Move env_get_hex() over to the new header file.

Signed-off-by: Simon Glass <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
  • Loading branch information
sjg20 authored and trini committed Aug 11, 2019
1 parent 6bf6dbe commit cdbff9f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions arch/x86/lib/zimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*/

#include <common.h>
#include <env.h>
#include <malloc.h>
#include <asm/acpi_table.h>
#include <asm/io.h>
Expand Down
1 change: 1 addition & 0 deletions cmd/elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <common.h>
#include <command.h>
#include <elf.h>
#include <env.h>
#include <environment.h>
#include <net.h>
#include <vxworks.h>
Expand Down
1 change: 1 addition & 0 deletions common/image-fdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <common.h>
#include <fdt_support.h>
#include <fdtdec.h>
#include <env.h>
#include <errno.h>
#include <image.h>
#include <linux/libfdt.h>
Expand Down
12 changes: 0 additions & 12 deletions include/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,6 @@ int do_ext2load(cmd_tbl_t *, int, int, char * const []);
*/
char *env_get(const char *varname);

/**
* env_get_hex() - Return an environment variable as a hex value
*
* Decode an environment as a hex number (it may or may not have a 0x
* prefix). If the environment variable cannot be found, or does not start
* with hex digits, the default value is returned.
*
* @varname: Variable to decode
* @default_val: Value to return on error
*/
ulong env_get_hex(const char *varname, ulong default_val);

/**
* env_set() - set an environment variable
*
Expand Down
12 changes: 12 additions & 0 deletions include/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,18 @@ ulong env_get_ulong(const char *name, int base, ulong default_val);
*/
int env_set_ulong(const char *varname, ulong value);

/**
* env_get_hex() - Return an environment variable as a hex value
*
* Decode an environment as a hex number (it may or may not have a 0x
* prefix). If the environment variable cannot be found, or does not start
* with hex digits, the default value is returned.
*
* @varname: Variable to decode
* @default_val: Value to return on error
*/
ulong env_get_hex(const char *varname, ulong default_val);

/**
* env_set_hex() - set an environment variable to a hex value
*
Expand Down

0 comments on commit cdbff9f

Please sign in to comment.