summaryrefslogtreecommitdiffstats
path: root/lib/cache.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2007-09-17 10:35:19 (GMT)
committerThomas Graf <tgraf@suug.ch>2007-09-17 10:35:19 (GMT)
commit3d8efba91778b65a40d50ca0b6ba91d4071564c5 (patch)
tree8a6445cf250a74a9668a4128544a8bc08d4d7565 /lib/cache.c
parent508685c269275cb7ba3471c75abc689b4e3839b1 (diff)
downloadlibnl-3d8efba91778b65a40d50ca0b6ba91d4071564c5.zip
libnl-3d8efba91778b65a40d50ca0b6ba91d4071564c5.tar.gz
libnl-3d8efba91778b65a40d50ca0b6ba91d4071564c5.tar.bz2
Check for availability of request_update()
The implementation of this function is optional if a cache wishes to be updated by notifications only.
Diffstat (limited to 'lib/cache.c')
-rw-r--r--lib/cache.c3
1 files changed, 3 insertions, 0 deletions
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);
}