Skip to content

Commit

Permalink
F #5015: Option to disable raw section validation (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Czerný authored and rsmontero committed Aug 19, 2020
1 parent d14841e commit 3f2560a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/vmm/VirtualMachineManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,14 @@ int VirtualMachineManager::validate_raw(const Template * vmt, string& error_str)
return 0;
}

bool validate;
raw->vector_value("VALIDATE", validate, true);

if (!validate)
{
return 0;
}

string value = raw->vector_value("TYPE");
one_util::tolower(value);

Expand All @@ -163,9 +171,8 @@ int VirtualMachineManager::validate_raw(const Template * vmt, string& error_str)

value = raw->vector_value("DATA");

return vmd->validate_raw(value, error_str);

return 0;
return vmd->validate_raw(value, error_str);
}

/* -------------------------------------------------------------------------- */
Expand Down

0 comments on commit 3f2560a

Please sign in to comment.