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>
*
* @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);
*
* @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);