Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b72231f authored by Tao Bao's avatar Tao Bao Committed by android-build-merger
Browse files

Merge "recovery: Don't report unrecognized option in recovery_main." am: 785d0b4e

am: e9788bc3

Change-Id: I4873bf08c5406a0e2270e2ee267a962b4f3164bf
parents 3fd5d407 e9788bc3
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -351,6 +351,12 @@ int main(int argc, char** argv) {
  std::string locale;
  std::string reason;

  // The code here is only interested in the options that signal the intent to start fastbootd or
  // recovery. Unrecognized options are likely meant for recovery, which will be processed later in
  // start_recovery(). Suppress the warnings for such -- even if some flags were indeed invalid, the
  // code in start_recovery() will capture and report them.
  opterr = 0;

  int arg;
  int option_index;
  while ((arg = getopt_long(args_to_parse.size() - 1, args_to_parse.data(), "", OPTIONS,
@@ -374,6 +380,7 @@ int main(int argc, char** argv) {
    }
  }
  optind = 1;
  opterr = 1;

  if (locale.empty()) {
    if (HasCache()) {