1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +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; const char *str;
if (!activation()) if (!activation())
return 0; return_0;
if (!_cache_checked) { if (!_cache_checked) {
_cache_checked = 1; _cache_checked = 1;
if (!(_cache_present = target_present(cmd, TARGET_NAME_CACHE, 1))) if (!(_cache_present = target_present_version(cmd, TARGET_NAME_CACHE, 1,
return 0; &maj, &min, &patchlevel)))
if (!target_version(TARGET_NAME_CACHE, &maj, &min, &patchlevel))
return_0; return_0;
if ((maj < 1) || if ((maj < 1) ||