cache: Move nl_cache_ops_set_flags() to cache_mngt.c
Signed-off-by: Thomas Graf <tgraf@suug.ch>
This commit is contained in:
parent
5734011228
commit
8ffa257bfa
2 changed files with 13 additions and 10 deletions
10
lib/cache.c
10
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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue