summaryrefslogtreecommitdiff
path: root/recovery_main.cpp
diff options
context:
space:
mode:
authorJerry Zhang <zhangjerry@google.com>2018-05-17 12:54:41 -0700
committerJerry Zhang <zhangjerry@google.com>2018-05-17 19:56:42 +0000
commit49fd5d262c6764b0a6746cfdb267e8bebec49256 (patch)
tree14fadf8929d56faab3e82f6c82f2702d3557ffc2 /recovery_main.cpp
parent2ddc54f5fd1f3ae07c2c363c37561133eb161258 (diff)
recovery: Reset optind to 1 after getopt
The getopt library exposes optind which is the next index to be processed. When scanning is restarted, optind has to be reset to 1. Test: Recovery works Bug: 78793464 Change-Id: I1efca3fb985ffbdfe91e43767469733cda6e7d5b
Diffstat (limited to 'recovery_main.cpp')
-rw-r--r--recovery_main.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/recovery_main.cpp b/recovery_main.cpp
index e21c782d..5e82c6c1 100644
--- a/recovery_main.cpp
+++ b/recovery_main.cpp
@@ -317,6 +317,7 @@ int main(int argc, char** argv) {
}
}
}
+ optind = 1;
if (locale.empty()) {
if (has_cache) {