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:
Thomas Graf 2007-09-17 12:35:19 +02:00
parent 508685c269
commit 3d8efba917

View File

@ -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);
}