summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2012-11-12 22:07:39 +0100
committerThomas Graf <tgraf@suug.ch>2012-11-12 22:07:39 +0100
commit8ffa257bfa36affebbca1505151b2cac42875e69 (patch)
treeaa490966241023aa76b03b8de452337f893053d3
parent57340112286d2de74248818e51236c45d60e86d4 (diff)
downloadlibnl-8ffa257bfa36affebbca1505151b2cac42875e69.tar.gz
cache: Move nl_cache_ops_set_flags() to cache_mngt.c
Signed-off-by: Thomas Graf <tgraf@suug.ch>
-rw-r--r--lib/cache.c10
-rw-r--r--lib/cache_mngt.c13
2 files changed, 13 insertions, 10 deletions
diff --git a/lib/cache.c b/lib/cache.c
index 6a0e71a..b776abf 100644
--- a/lib/cache.c
+++ b/lib/cache.c
@@ -567,16 +567,6 @@ void nl_cache_set_arg2(struct nl_cache *cache, int 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
* @arg flags Flags
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
@@ -130,6 +130,19 @@ void nl_cache_ops_foreach(void (*cb)(struct nl_cache_ops *, void *), void *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
*