1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-28 02:50:41 +03:00

activation: activation check is mandatory

Make missing activation() check before calling target_persent
an INTERNAL_ERROR.
This commit is contained in:
Zdenek Kabelac 2016-05-06 13:59:50 +02:00
parent 2842a645fd
commit 1202713f94

View File

@ -636,9 +636,10 @@ int target_present_version(struct cmd_context *cmd, const char *target_name,
int use_modprobe,
uint32_t *maj, uint32_t *min, uint32_t *patchlevel)
{
if (!activation())
return_0;
if (!activation()) {
log_error(INTERNAL_ERROR "Target present version called when activation is disabled.");
return 0;
}
#ifdef MODPROBE_CMD
if (use_modprobe) {
if (target_version(target_name, maj, min, patchlevel))