summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot2017-08-09 02:32:45 -0500
committerandroid-build-team Robot2017-08-09 02:32:45 -0500
commit797804942182e118cd63b3161843a03c1601a84b (patch)
tree27625d8fdb35ab5a9f6b5326db0cb16c758a24e7
parent8c26bf4a6fd053ea14f19a59fbdab4c4f201e1b6 (diff)
parenta49459e9e2bbf268a7451585c197eb3a4e6f1aaf (diff)
downloadplatform-system-libvintf-797804942182e118cd63b3161843a03c1601a84b.tar.gz
platform-system-libvintf-797804942182e118cd63b3161843a03c1601a84b.tar.xz
platform-system-libvintf-797804942182e118cd63b3161843a03c1601a84b.zip
release-request-9ff446ef-fe26-4f50-a0f0-c1d38619140f-for-git_oc-mr1-release-4257899 snap-temp-L58400000090817127
Change-Id: I6c7d3652ed6951343ebac8c3847661728368b13e
-rw-r--r--assemble_vintf.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/assemble_vintf.cpp b/assemble_vintf.cpp
index 8b7e609..cbfc368 100644
--- a/assemble_vintf.cpp
+++ b/assemble_vintf.cpp
@@ -92,6 +92,19 @@ public:
92 return true; 92 return true;
93 } 93 }
94 94
95 static bool parseFilesForKernelConfigs(const std::string& path, std::vector<KernelConfig>* out) {
96 bool ret = true;
97 char *pathIter;
98 char *modPath = new char[path.length() + 1];
99 strcpy(modPath, path.c_str());
100 pathIter = strtok(modPath, ":");
101 while (ret && pathIter != NULL) {
102 ret &= parseFileForKernelConfigs(pathIter, out);
103 pathIter = strtok(NULL, ":");
104 }
105 return ret;
106 }
107
95 std::basic_ostream<char>& out() const { 108 std::basic_ostream<char>& out() const {
96 return mOutFileRef == nullptr ? std::cout : *mOutFileRef; 109 return mOutFileRef == nullptr ? std::cout : *mOutFileRef;
97 } 110 }
@@ -154,7 +167,7 @@ public:
154 } 167 }
155 for (const auto& pair : mKernels) { 168 for (const auto& pair : mKernels) {
156 std::vector<KernelConfig> configs; 169 std::vector<KernelConfig> configs;
157 if (!parseFileForKernelConfigs(pair.second, &configs)) { 170 if (!parseFilesForKernelConfigs(pair.second, &configs)) {
158 return false; 171 return false;
159 } 172 }
160 bool added = false; 173 bool added = false;
@@ -338,11 +351,13 @@ void help() {
338 " message is written to stderr. Return 0.\n" 351 " message is written to stderr. Return 0.\n"
339 " If the check file is specified but is not compatible, an error\n" 352 " If the check file is specified but is not compatible, an error\n"
340 " message is written to stderr. Return 1.\n" 353 " message is written to stderr. Return 1.\n"
341 " --kernel=<version>:<android-base.cfg>\n" 354 " --kernel=<version>:<android-base.cfg>[:<android-base-arch.cfg>[...]]\n"
342 " Add a kernel entry to framework compatibility matrix.\n" 355 " Add a kernel entry to framework compatibility matrix.\n"
343 " Ignored for other input format.\n" 356 " Ignored for other input format.\n"
344 " <version> has format: 3.18\n" 357 " <version> has format: 3.18\n"
345 " <android-base.cfg> is the location of android-base.cfg\n"; 358 " <android-base.cfg> is the location of android-base.cfg\n"
359 " <android-base-arch.cfg> is the location of an optional\n"
360 " arch-specific config fragment, more than one may be specified\n";
346} 361}
347 362
348int main(int argc, char **argv) { 363int main(int argc, char **argv) {