Merge "recovery: Reset optind to 1 after getopt" am: 38d90316b2
am: 25d31c9f9c

Change-Id: Id2d80584075c3482748e5946d39fe8ef572aea45
diff --git a/recovery.cpp b/recovery.cpp
index 2360057..ac3e7c6 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -1069,6 +1069,7 @@
         continue;
     }
   }
+  optind = 1;
 
   printf("stage is [%s]\n", stage.c_str());
   printf("reason is [%s]\n", reason);
diff --git a/recovery_main.cpp b/recovery_main.cpp
index e21c782..5e82c6c 100644
--- a/recovery_main.cpp
+++ b/recovery_main.cpp
@@ -317,6 +317,7 @@
       }
     }
   }
+  optind = 1;
 
   if (locale.empty()) {
     if (has_cache) {