From 3d8efba91778b65a40d50ca0b6ba91d4071564c5 Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Mon, 17 Sep 2007 12:35:19 +0200 Subject: Check for availability of request_update() The implementation of this function is optional if a cache wishes to be updated by notifications only. --- lib/cache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cache.c b/lib/cache.c index 577b2ba..c770765 100644 --- a/lib/cache.c +++ b/lib/cache.c @@ -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); } -- cgit v0.12