Check for availability of request_update()
The implementation of this function is optional if a cache wishes to be updated by notifications only.
This commit is contained in:
parent
508685c269
commit
3d8efba917
1 changed files with 3 additions and 0 deletions
|
@ -419,6 +419,9 @@ int nl_cache_request_full_dump(struct nl_handle *handle, struct nl_cache *cache)
|
|||
NL_DBG(2, "Requesting dump from kernel for cache %p <%s>...\n",
|
||||
cache, nl_cache_name(cache));
|
||||
|
||||
if (cache->c_ops->co_request_update == NULL)
|
||||
return nl_error(EOPNOTSUPP, "Operation not supported");
|
||||
|
||||
return cache->c_ops->co_request_update(cache, handle);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue