Merge "System always contains root dir."
diff --git a/AssembleVintf.cpp b/AssembleVintf.cpp
index faab3e1..272301e 100644
--- a/AssembleVintf.cpp
+++ b/AssembleVintf.cpp
@@ -89,11 +89,13 @@
}
template <typename T>
- bool getFlag(const std::string& key, T* value) const {
+ bool getFlag(const std::string& key, T* value, bool log = true) const {
std::string envValue = getEnv(key);
if (envValue.empty()) {
- std::cerr << "Warning: " << key << " is missing, defaulted to " << (*value) << "."
- << std::endl;
+ if (log) {
+ std::cerr << "Warning: " << key << " is missing, defaulted to " << (*value) << "."
+ << std::endl;
+ }
return true;
}
@@ -559,6 +561,9 @@
deviceLevel == Level::UNSPECIFIED /* log */);
getFlagIfUnset("FRAMEWORK_VBMETA_VERSION", &matrix->framework.mAvbMetaVersion,
deviceLevel == Level::UNSPECIFIED /* log */);
+ // Hard-override existing AVB version
+ getFlag("FRAMEWORK_VBMETA_VERSION_OVERRIDE", &matrix->framework.mAvbMetaVersion,
+ false /* log */);
}
outputInputs(*matrices);
out() << gCompatibilityMatrixConverter(*matrix, mSerializeFlags);
diff --git a/parse_string.cpp b/parse_string.cpp
index b99ba61..e3310f3 100644
--- a/parse_string.cpp
+++ b/parse_string.cpp
@@ -196,6 +196,11 @@
}
bool parseKernelConfigTypedValue(const std::string& s, KernelConfigTypedValue* kctv) {
+ if (s.size() > 1 && s[0] == '"' && s.back() == '"') {
+ kctv->mType = KernelConfigType::STRING;
+ kctv->mStringValue = s.substr(1, s.size()-2);
+ return true;
+ }
if (parseKernelConfigInt(s, &kctv->mIntegerValue)) {
kctv->mType = KernelConfigType::INTEGER;
return true;
@@ -205,9 +210,7 @@
return true;
}
// Do not test for KernelConfigType::RANGE.
- kctv->mType = KernelConfigType::STRING;
- kctv->mStringValue = s;
- return true;
+ return false;
}
bool parse(const std::string &s, Version *ver) {