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:
parent
4d116d7a28
commit
fd79027cae
@ -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) ||
|
||||||
|
Loading…
Reference in New Issue
Block a user