diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2015-12-17 12:23:33 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2016-01-14 11:34:05 +0100 |
commit | 8857b227645e97b7cb52ae8d007e87e07db58b4e (patch) | |
tree | a1e631173774754241efd6cd0581966166c87664 /lib/mirror | |
parent | 43897239b3cdd9ed9c1c7b795e171d9565d13116 (diff) | |
download | lvm2-8857b227645e97b7cb52ae8d007e87e07db58b4e.tar.gz |
segtype: check for activation
Before setting static variable with check passed state,
detect if we are allowed to talk to driver.
Diffstat (limited to 'lib/mirror')
-rw-r--r-- | lib/mirror/mirrored.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/mirror/mirrored.c b/lib/mirror/mirrored.c index 371718d56..fe6afbe81 100644 --- a/lib/mirror/mirrored.c +++ b/lib/mirror/mirrored.c @@ -398,9 +398,14 @@ static int _mirrored_target_present(struct cmd_context *cmd, unsigned maj2, min2, patchlevel2; char vsn[80]; + if (!activation()) + return 0; + if (!_mirrored_checked) { _mirrored_checked = 1; - _mirrored_present = target_present(cmd, "mirror", 1); + + if (!(_mirrored_present = target_present(cmd, "mirror", 1))) + return 0; /* * block_on_error available as "block_on_error" log |