/* Try to open specified file with following names: ./name /name The latter is used when srctree is separate from objtree when compiling the kernel. Return NULL if file is not found.  */
FILE* zconf_fopen(const char *name)
/* Try to open specified file with following names: ./name /name The latter is used when srctree is separate from objtree when compiling the kernel. Return NULL if file is not found.  */
FILE* zconf_fopen(const char *name)
{
	char *env, fullname[PATH_MAX+1];
	FILE *f;
	f = fopen(name, "r");
	if (!f && name != NULL && name[0] != '/') {
		env = getenv(SRCTREE);
		if (env) {
			sprintf(fullname, "%s/%s", env, name);
			f = fopen(fullname, "r");
		}
	}
	return f;
}