mirror of
https://gitee.com/openharmony/third_party_libnl
synced 2024-12-11 12:47:27 +00:00
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
@ -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…
Reference in New Issue
Block a user