Exemplo n.º 1
0
const struct fdt_property *fdt_get_property(const void *fdt,
					    int nodeoffset,
					    const char *name, int *lenp)
{
	return fdt_get_property_namelen(fdt, nodeoffset, name,
					strlen(name), lenp);
}
Exemplo n.º 2
0
const void *fdt_getprop_namelen(const void *fdt, int nodeoffset,
				const char *name, int namelen, int *lenp)
{
	const struct fdt_property *prop;

	prop = fdt_get_property_namelen(fdt, nodeoffset, name, namelen, lenp);
	if (! prop)
		return NULL;

	return prop->data;
}
Exemplo n.º 3
0
/*
 * nodeoffset: 탐색 대상이되는 node의 offset
 * name: 찾을 property 이름
 * namelen: 찾을 property 이름 길이
 * lenp: property value 길이
*/
const void *fdt_getprop_namelen(const void *fdt, int nodeoffset,
				const char *name, int namelen, int *lenp)
{
	const struct fdt_property *prop;

	// 찾고자 하는 property가 있는지 확인하고 property의 구조체를 가져옴
	prop = fdt_get_property_namelen(fdt, nodeoffset, name, namelen, lenp);
	// 가져온 property 구조체가 없다면 NULL 리턴
	if (! prop)
		return NULL;

	// 가져온 property 구조체가 있다면 value을 리턴
	return prop->data;
}