mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 04:46:01 +01:00
env: Fix documentation for env_get_f()
This function actually returns: - the number of bytes written into @buf excluding the terminating NULL-byte, if there was enough space in @buf - the number of bytes written into @buf including the terminating NULL-byte, if there wasn't enough space in @buf - -1 if the variable is not found Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
3610970872
commit
6dc1e2f10c
@ -131,7 +131,10 @@ char *from_env(const char *envvar);
|
|||||||
* support reading the value (slowly) and some will not.
|
* support reading the value (slowly) and some will not.
|
||||||
*
|
*
|
||||||
* @varname: Variable to look up
|
* @varname: Variable to look up
|
||||||
* @return value of variable, or NULL if not found
|
* @return number of bytes written into @buf, excluding the terminating
|
||||||
|
* NULL-byte if there was enough space in @buf, and including the
|
||||||
|
* terminating NULL-byte if there wasn't enough space, or -1 if the
|
||||||
|
* variable is not found
|
||||||
*/
|
*/
|
||||||
int env_get_f(const char *name, char *buf, unsigned int len);
|
int env_get_f(const char *name, char *buf, unsigned int len);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user