/* (Re)fill a cache with the contents in the kernel.  */
int nl_cache_refill(struct nl_sock *sk, struct nl_cache *cache)
/* (Re)fill a cache with the contents in the kernel.  */
int nl_cache_refill(struct nl_sock *sk, struct nl_cache *cache)
{
	int err;
	err = nl_cache_request_full_dump(sk, cache);
	if (err < 0)
		return err;
	NL_DBG(2, "Upading cache %p <%s>, request sent, waiting for dump...\n",
	       cache, nl_cache_name(cache));
	nl_cache_clear(cache);
	return nl_cache_pickup(sk, cache);
}