Revert "Revert "Some cleanups to recovery.""

This reverts commit 8584fcf677dd45b30121bd0490b06297e6be1871.

This CL re-lands commit c0319b60f56d445c2d1c74f551e01f069b028fe6.
The "stage" and "reason" variables are now declared as global by
dropping the static qualifier, because they may be used by vendor
recovery libraries.

Test: lunch aosp_angler-userdebug; mmma bootable/recovery
Test: lunch aosp_dragon-userdebug; mmma bootable/recovery

Change-Id: I252c346f450079478cff22bbff01590b8ab2e2b3
diff --git a/print_sha1.h b/print_sha1.h
index c7c1f36..1f85895 100644
--- a/print_sha1.h
+++ b/print_sha1.h
@@ -20,7 +20,7 @@
 #include <stdint.h>
 #include <string>
-#include "openssl/sha.h"
+#include <openssl/sha.h>
 static std::string print_sha1(const uint8_t* sha1, size_t len) {
     const char* hex = "0123456789abcdef";
@@ -41,7 +41,7 @@
 static std::string print_hex(const uint8_t* bytes, size_t len) {
-  return print_sha1(bytes, len);
+    return print_sha1(bytes, len);