Loading toolbox/modprobe.cpp +5 −2 Original line number Original line Diff line number Diff line Loading @@ -52,7 +52,7 @@ void print_usage(void) { LOG(INFO) << " -h, --help: Print this help"; LOG(INFO) << " -h, --help: Print this help"; LOG(INFO) << " -l, --list: List modules matching pattern"; LOG(INFO) << " -l, --list: List modules matching pattern"; LOG(INFO) << " -r, --remove: Remove MODULE (multiple modules may be specified)"; LOG(INFO) << " -r, --remove: Remove MODULE (multiple modules may be specified)"; LOG(INFO) << " -s, --syslog: print to syslog also (deprecated)"; LOG(INFO) << " -s, --syslog: print to syslog also"; LOG(INFO) << " -q, --quiet: disable messages"; LOG(INFO) << " -q, --quiet: disable messages"; LOG(INFO) << " -v, --verbose: enable more messages, even more with a second -v"; LOG(INFO) << " -v, --verbose: enable more messages, even more with a second -v"; LOG(INFO); LOG(INFO); Loading @@ -76,10 +76,12 @@ std::string stripComments(const std::string& str) { /* NOTREACHED */ /* NOTREACHED */ } } auto syslog = false; void MyLogger(android::base::LogId id, android::base::LogSeverity severity, const char* tag, void MyLogger(android::base::LogId id, android::base::LogSeverity severity, const char* tag, const char* file, unsigned int line, const char* message) { const char* file, unsigned int line, const char* message) { android::base::StdioLogger(id, severity, tag, file, line, message); android::base::StdioLogger(id, severity, tag, file, line, message); if (message[0]) { if (syslog && message[0]) { android::base::KernelLogger(id, severity, tag, file, line, message); android::base::KernelLogger(id, severity, tag, file, line, message); } } } } Loading Loading @@ -198,6 +200,7 @@ extern "C" int modprobe_main(int argc, char** argv) { mode = RemoveModulesMode; mode = RemoveModulesMode; break; break; case 's': case 's': syslog = true; break; break; case 'v': case 'v': if (android::base::GetMinimumLogSeverity() <= android::base::DEBUG) { if (android::base::GetMinimumLogSeverity() <= android::base::DEBUG) { Loading Loading
toolbox/modprobe.cpp +5 −2 Original line number Original line Diff line number Diff line Loading @@ -52,7 +52,7 @@ void print_usage(void) { LOG(INFO) << " -h, --help: Print this help"; LOG(INFO) << " -h, --help: Print this help"; LOG(INFO) << " -l, --list: List modules matching pattern"; LOG(INFO) << " -l, --list: List modules matching pattern"; LOG(INFO) << " -r, --remove: Remove MODULE (multiple modules may be specified)"; LOG(INFO) << " -r, --remove: Remove MODULE (multiple modules may be specified)"; LOG(INFO) << " -s, --syslog: print to syslog also (deprecated)"; LOG(INFO) << " -s, --syslog: print to syslog also"; LOG(INFO) << " -q, --quiet: disable messages"; LOG(INFO) << " -q, --quiet: disable messages"; LOG(INFO) << " -v, --verbose: enable more messages, even more with a second -v"; LOG(INFO) << " -v, --verbose: enable more messages, even more with a second -v"; LOG(INFO); LOG(INFO); Loading @@ -76,10 +76,12 @@ std::string stripComments(const std::string& str) { /* NOTREACHED */ /* NOTREACHED */ } } auto syslog = false; void MyLogger(android::base::LogId id, android::base::LogSeverity severity, const char* tag, void MyLogger(android::base::LogId id, android::base::LogSeverity severity, const char* tag, const char* file, unsigned int line, const char* message) { const char* file, unsigned int line, const char* message) { android::base::StdioLogger(id, severity, tag, file, line, message); android::base::StdioLogger(id, severity, tag, file, line, message); if (message[0]) { if (syslog && message[0]) { android::base::KernelLogger(id, severity, tag, file, line, message); android::base::KernelLogger(id, severity, tag, file, line, message); } } } } Loading Loading @@ -198,6 +200,7 @@ extern "C" int modprobe_main(int argc, char** argv) { mode = RemoveModulesMode; mode = RemoveModulesMode; break; break; case 's': case 's': syslog = true; break; break; case 'v': case 'v': if (android::base::GetMinimumLogSeverity() <= android::base::DEBUG) { if (android::base::GetMinimumLogSeverity() <= android::base::DEBUG) { Loading