示例#1
0
static char *
get_full_name( mol_device_node_t *dn, char *buf, int len )
{
	if( !len )
		return NULL;

	buf[0] = 0;
	_get_full_name( dn, buf, len );
	return buf;
}
示例#2
0
static void
_get_full_name( mol_device_node_t *dn, char *buf, int len )
{
	if( dn->parent )
		_get_full_name( dn->parent, buf, len );
	
	/* this avoids a two leading / */
	if( !(dn->parent && !dn->parent->parent) )
		strncat0( buf, "/", len );

	/* root node name (e.g. devic-tree) should not be included */
	if( dn->parent )
		strncat0( buf, (char *) node_name(dn), len );
	if( dn->unit_string )
		strncat3( buf, "@", dn->unit_string, len );
}
示例#3
0
	/// Returns the fully specified path of the reflected named object
	inline std::string full_name(void) const
	{
		assert(_get_full_name != nullptr);
		return _get_full_name();
	}