libmodprobe: Fail when modules.dep lacks colon
The first argument in a modules.dep line must end with a colon so fail
if that condition is not met.
Test: libmodprobe_tests
Change-Id: I6f3a22758302f16b924e5a16f7af9bf35f1a56f3
diff --git a/libmodprobe/libmodprobe.cpp b/libmodprobe/libmodprobe.cpp
index ceabf62..b3ae937 100644
--- a/libmodprobe/libmodprobe.cpp
+++ b/libmodprobe/libmodprobe.cpp
@@ -66,6 +66,7 @@
deps.emplace_back(prefix + args[0].substr(0, pos));
} else {
LOG(ERROR) << "dependency lines must start with name followed by ':'";
+ return false;
}
// Remaining items are dependencies of our module