* 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. */
| 4050 | * Return NULL if file is not found. |
| 4051 | */ |
| 4052 | FILE *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 | |
| 4069 | void zconf_initscan(const char *name) |
| 4070 | { |
no outgoing calls
no test coverage detected