int yang_dnode_get_enum(const struct lyd_node *dnode, const char *xpath_fmt,
			...)
{
	const struct lyd_value *dvalue;

	dvalue = YANG_DNODE_XPATH_GET_VALUE(dnode, xpath_fmt);
	assert(dvalue->realtype->basetype == LY_TYPE_ENUM);
	assert(dvalue->enum_item->flags & LYS_SET_VALUE);
	return dvalue->enum_item->value;
}
int yang_dnode_get_enum(const struct lyd_node *dnode, const char *xpath_fmt,
			...)
{
	const struct lyd_value *dvalue;

	dvalue = YANG_DNODE_XPATH_GET_VALUE(dnode, xpath_fmt);
	assert(dvalue->realtype->basetype == LY_TYPE_ENUM);
	assert(dvalue->enum_item->flags & LYS_SET_VALUE);
	return dvalue->enum_item->value;
}