diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2016-04-27 11:13:36 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2016-05-05 23:34:35 +0200 |
commit | fd79027cae16be4f7fcae98568c2063ac37c9e3a (patch) | |
tree | 95457318724cf42f43fba31486ecb51a537f8eb3 | |
parent | 4d116d7a28974648183623c46014b9dcff48748d (diff) | |
download | lvm2-fd79027cae16be4f7fcae98568c2063ac37c9e3a.tar.gz |
cache: use target_present_version
Using new function.
Also add trace for error path.
-rw-r--r-- | lib/cache_segtype/cache.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/cache_segtype/cache.c b/lib/cache_segtype/cache.c index 199bda62a..b3edff8e3 100644 --- a/lib/cache_segtype/cache.c +++ b/lib/cache_segtype/cache.c @@ -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) || |