forked from u-boot/u-boot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
env: Create a new file for environment functions
At present we have environment.h but this file includes all the environment-related header files as well as internals such as default_environment. It seems desirable to have a new header to hold the commonly used environment functions, so that most files can avoid including all of this unnecessary stuff. Create a new env.h header and move one function over to it. Signed-off-by: Simon Glass <[email protected]> Acked-by: Joe Hershberger <[email protected]> Reviewed-by: Simon Goldschmidt <[email protected]>
- Loading branch information
Showing
3 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* SPDX-License-Identifier: GPL-2.0+ */ | ||
/* | ||
* Common environment functions | ||
* | ||
* (C) Copyright 2000-2009 | ||
* Wolfgang Denk, DENX Software Engineering, [email protected]. | ||
*/ | ||
|
||
#ifndef __ENV_H | ||
#define __ENV_H | ||
|
||
#include <stdbool.h> | ||
|
||
/** | ||
* env_complete() - return an auto-complete for environment variables | ||
* | ||
* @var: partial name to auto-complete | ||
* @maxv: Maximum number of matches to return | ||
* @cmdv: Returns a list of possible matches | ||
* @maxsz: Size of buffer to use for matches | ||
* @buf: Buffer to use for matches | ||
* @dollar_comp: non-zero to wrap each match in ${...} | ||
* @return number of matches found (in @cmdv) | ||
*/ | ||
int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf, | ||
bool dollar_comp); | ||
|
||
#endif |