diff options
author | Marek Vasut <marex@denx.de> | 2022-12-18 08:05:02 +0100 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2023-01-04 13:17:42 +0100 |
commit | fbc595b4124de3d51cb00fe541b93a3d979a58ec (patch) | |
tree | 167c611a00bea7957fbdcd787a901675bb7901ea | |
parent | 566b7b2f518797540413bf55862b6562158aced9 (diff) | |
download | u-boot-fbc595b4124de3d51cb00fe541b93a3d979a58ec.zip u-boot-fbc595b4124de3d51cb00fe541b93a3d979a58ec.tar.gz u-boot-fbc595b4124de3d51cb00fe541b93a3d979a58ec.tar.bz2 |
doc: Fix eth_env_[gs]et_enetaddr() return value
Per env/common.c, eth_env_get_enetaddr() returns the same return
values as is_valid_ethaddr(), i.e. true if valid, false otherwise.
Per env/common.c, eth_env_set_enetaddr() may return -EEXIST is the
ethaddr is already set. Fix both.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-rw-r--r-- | include/env.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/env.h b/include/env.h index 60acb54..1480efa 100644 --- a/include/env.h +++ b/include/env.h @@ -226,7 +226,7 @@ int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf, * * @name: Environment variable to get (e.g. "ethaddr") * @enetaddr: Place to put MAC address (6 bytes) - * Return: 0 if OK, 1 on error + * Return: 1 if OK, 0 on error */ int eth_env_get_enetaddr(const char *name, uint8_t *enetaddr); @@ -235,7 +235,7 @@ int eth_env_get_enetaddr(const char *name, uint8_t *enetaddr); * * @name: Environment variable to set (e.g. "ethaddr") * @enetaddr: Pointer to MAC address to put into the variable (6 bytes) - * Return: 0 if OK, 1 on error + * Return: 0 if OK, non-zero otherwise */ int eth_env_set_enetaddr(const char *name, const uint8_t *enetaddr); |