1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 18:55:19 +03:00

cache: use target_present_version

Using new function.
Also add trace for error path.
This commit is contained in:
Zdenek Kabelac 2016-04-27 11:13:36 +02:00
parent 4d116d7a28
commit fd79027cae

View File

@ -227,15 +227,13 @@ static int _target_present(struct cmd_context *cmd,
const char *str;
if (!activation())
return 0;
return_0;
if (!_cache_checked) {
_cache_checked = 1;
if (!(_cache_present = target_present(cmd, TARGET_NAME_CACHE, 1)))
return 0;
if (!target_version(TARGET_NAME_CACHE, &maj, &min, &patchlevel))
if (!(_cache_present = target_present_version(cmd, TARGET_NAME_CACHE, 1,
&maj, &min, &patchlevel)))
return_0;
if ((maj < 1) ||