MCPcopy Create free account
hub / github.com/Entware/Entware / zconf_fopen

Function zconf_fopen

scripts/config/lexer.lex.c:4052–4067  ·  view source on GitHub ↗

* Try to open specified file with following names: * ./name * $(srctree)/name * The latter is used when srctree is separate from objtree * when compiling the kernel. * Return NULL if file is not found. */

Source from the content-addressed store, hash-verified

4050 * Return NULL if file is not found.
4051 */
4052FILE *zconf_fopen(const char *name)
4053{
4054 char *env, fullname[PATH_MAX+1];
4055 FILE *f;
4056
4057 f = fopen(name, "r");
4058 if (!f && name != NULL && name[0] != '/') {
4059 env = getenv(SRCTREE);
4060 if (env) {
4061 snprintf(fullname, sizeof(fullname),
4062 "%s/%s", env, name);
4063 f = fopen(fullname, "r");
4064 }
4065 }
4066 return f;
4067}
4068
4069void zconf_initscan(const char *name)
4070{

Callers 3

conf_read_simpleFunction · 0.85
zconf_initscanFunction · 0.85
__zconf_nextfileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected