From: Thomas Graf Date: Mon, 12 Nov 2012 21:07:39 +0000 (+0100) Subject: cache: Move nl_cache_ops_set_flags() to cache_mngt.c X-Git-Tag: libnl3_2_15~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ffa257bfa36affebbca1505151b2cac42875e69;p=thirdparty%2Flibnl.git cache: Move nl_cache_ops_set_flags() to cache_mngt.c Signed-off-by: Thomas Graf --- diff --git a/lib/cache.c b/lib/cache.c index 6a0e71a..b776abf 100644 --- a/lib/cache.c +++ b/lib/cache.c @@ -566,16 +566,6 @@ void nl_cache_set_arg2(struct nl_cache *cache, int arg) cache->c_iarg2 = arg; } -/** - * Set cache ops flags - * @arg ops Cache ops - * @arg arg flags - */ -void nl_cache_ops_set_flags(struct nl_cache_ops *ops, unsigned int flags) -{ - ops->co_flags |= flags; -} - /** * Set cache flags * @arg cache Cache diff --git a/lib/cache_mngt.c b/lib/cache_mngt.c index 6691454..fa1ac22 100644 --- a/lib/cache_mngt.c +++ b/lib/cache_mngt.c @@ -129,6 +129,19 @@ void nl_cache_ops_foreach(void (*cb)(struct nl_cache_ops *, void *), void *arg) cb(ops, arg); } +/** + * Set default flags for caches of this type + * @arg ops Cache ops + * @arg flags Flags to set + * + * The cache operation flags will be derived to all caches allocates + * based on this set of cache operations. + */ +void nl_cache_ops_set_flags(struct nl_cache_ops *ops, unsigned int flags) +{ + ops->co_flags |= flags; +} + /** * Register a set of cache operations * @arg ops cache operations