예제 #1
0
파일: symbol.c 프로젝트: me-oss/me-pcd
void sym_init(void)
{
	struct symbol *sym;
	struct utsname uts;
	char *p;
	static bool inited = false;

	if (inited)
		return;
	inited = true;

	uname(&uts);

	sym = sym_lookup("ARCH", 0);
	sym->type = S_STRING;
	sym->flags |= SYMBOL_AUTO;
	p = getenv("ARCH");
	if (p)
		sym_add_default(sym, p);

	sym = sym_lookup("KERNELVERSION", 0);
	sym->type = S_STRING;
	sym->flags |= SYMBOL_AUTO;
	p = getenv("KERNELVERSION");
	if (p)
		sym_add_default(sym, p);

	sym = sym_lookup("UNAME_RELEASE", 0);
	sym->type = S_STRING;
	sym->flags |= SYMBOL_AUTO;
	sym_add_default(sym, uts.release);
}
예제 #2
0
파일: symbol.c 프로젝트: 0919061/PX4NuttX
void sym_init(void)
{
	struct symbol *sym;
	char *p;
	static bool inited = false;

	if (inited)
		return;
	inited = true;

	sym = sym_lookup("VERSION", 0);
	sym->type = S_STRING;
	sym->flags |= SYMBOL_AUTO;
	p = getenv("VERSION");
	if (p)
		sym_add_default(sym, p);

	sym = sym_lookup("TARGET_ARCH", 0);
	sym->type = S_STRING;
	sym->flags |= SYMBOL_AUTO;
	p = getenv("TARGET_ARCH");
	if (p)
		sym_add_default(sym, p);

}
예제 #3
0
파일: symbol.c 프로젝트: MikeeHawk/coreboot
void sym_init(void)
{
	struct symbol *sym;
#ifndef __MINGW32__
	struct utsname uts;
#endif
	static bool inited = false;

	if (inited)
		return;
	inited = true;

#ifndef __MINGW32__
	uname(&uts);
#endif

	sym = sym_lookup("UNAME_RELEASE", 0);
	sym->type = S_STRING;
	sym->flags |= SYMBOL_AUTO;
#ifndef __MINGW32__
	sym_add_default(sym, uts.release);
#else
	sym_add_default(sym, "mingw-unknown");
#endif
}
예제 #4
0
void sym_init(void)
{
	struct symbol *sym;
	struct utsname uts;
	static bool inited = false;

	if (inited)
		return;
	inited = true;

	uname(&uts);

	sym = sym_lookup("UNAME_RELEASE", 0);
	sym->type = S_STRING;
	sym->flags |= SYMBOL_AUTO;
	sym_add_default(sym, uts.release);
}