package/libs/libnl-tiny/src/cache_mngt.c
/**
 * Register a set of cache operations
 * @arg ops		cache operations
 *
 * Called by users of caches to announce the avaibility of
 * a certain cache type.
 *
 * @return 0 on success or a negative error code.
 */
Register a set of cache operations
@arg ops             cache operations

Called by users of caches to announce the avaibility of
a certain cache type.

@return 0 on success or a negative error code.
Register a set of cache operations @arg ops cache operations Called by users of caches to announce the avaibility of a certain cache type . @return 0 on success or a negative error code .
int nl_cache_mngt_register(struct nl_cache_ops *ops)
{
	if (!ops->co_name || !ops->co_obj_ops)
		return -NLE_INVAL;
	if (nl_cache_ops_lookup(ops->co_name))
		return -NLE_EXIST;
	ops->co_next = cache_ops;
	cache_ops = ops;
	NL_DBG(1, "Registered cache operations %s\n", ops->co_name);
	return 0;
}
int nl_cache_mngt_register ( struct nl_cache_ops * ops ) { if ( ! ops -> co_name || ! ops -> co_obj_ops ) return - NLE_INVAL ; if ( nl_cache_ops_lookup ( ops -> co_name ) ) return - NLE_EXIST ; ops -> co_next = cache_ops ; cache_ops = ops ; NL_DBG ( 1 , " \n " , ops -> co_name ) ; return 0 ; }
Register a set of cache operations
 @arg ops             cache operations
Register a set of cache operations @arg ops cache operations