summaryrefslogtreecommitdiffstats
path: root/lib/cache_mngt.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2012-11-12 21:07:39 (GMT)
committerThomas Graf <tgraf@suug.ch>2012-11-12 21:07:39 (GMT)
commit8ffa257bfa36affebbca1505151b2cac42875e69 (patch)
treeaa490966241023aa76b03b8de452337f893053d3 /lib/cache_mngt.c
parent57340112286d2de74248818e51236c45d60e86d4 (diff)
downloadlibnl-8ffa257bfa36affebbca1505151b2cac42875e69.zip
libnl-8ffa257bfa36affebbca1505151b2cac42875e69.tar.gz
libnl-8ffa257bfa36affebbca1505151b2cac42875e69.tar.bz2
cache: Move nl_cache_ops_set_flags() to cache_mngt.c
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Diffstat (limited to 'lib/cache_mngt.c')
-rw-r--r--lib/cache_mngt.c13
1 files changed, 13 insertions, 0 deletions
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
*