diff options
author | Tom Cherry <tomcherry@google.com> | 2017-04-24 16:47:18 -0700 |
---|---|---|
committer | Tom Cherry <tomcherry@google.com> | 2017-04-25 11:24:33 -0700 |
commit | ad6741c6f82febee62bbfc439d03654c2cb3ba3e (patch) | |
tree | c39a1d0ac4f41f4add55a3fcc7e7a1a9040a3a76 /init/init_parser.cpp | |
parent | fe062055cb11fcb1a6178b046173fc0361ad5b96 (diff) |
init: remove unused parts of parser.cpp
Now that ueventd is using init's parser, we no longer need anything
other than the tokenizer from parser.cpp.
Test: Boot bullhead
Change-Id: I1f70f2c4479af576174bd74dd919d81817500216
Diffstat (limited to 'init/init_parser.cpp')
-rw-r--r-- | init/init_parser.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/init/init_parser.cpp b/init/init_parser.cpp index c8ef8d9e6..620367a62 100644 --- a/init/init_parser.cpp +++ b/init/init_parser.cpp @@ -48,7 +48,6 @@ void Parser::ParseData(const std::string& filename, const std::string& data) { data_copy.push_back('\0'); parse_state state; - state.filename = filename.c_str(); state.line = 0; state.ptr = &data_copy[0]; state.nexttoken = 0; @@ -76,7 +75,7 @@ void Parser::ParseData(const std::string& filename, const std::string& data) { std::string ret_err; if (!callback(std::move(args), &ret_err)) { - parse_error(&state, "%s\n", ret_err.c_str()); + LOG(ERROR) << filename << ": " << state.line << ": " << ret_err; } section_parser = nullptr; break; @@ -88,15 +87,14 @@ void Parser::ParseData(const std::string& filename, const std::string& data) { } section_parser = section_parsers_[args[0]].get(); std::string ret_err; - if (!section_parser->ParseSection(std::move(args), state.filename, state.line, - &ret_err)) { - parse_error(&state, "%s\n", ret_err.c_str()); + if (!section_parser->ParseSection(std::move(args), filename, state.line, &ret_err)) { + LOG(ERROR) << filename << ": " << state.line << ": " << ret_err; section_parser = nullptr; } } else if (section_parser) { std::string ret_err; if (!section_parser->ParseLineSection(std::move(args), state.line, &ret_err)) { - parse_error(&state, "%s\n", ret_err.c_str()); + LOG(ERROR) << filename << ": " << state.line << ": " << ret_err; } } args.clear(); |