summaryrefslogtreecommitdiffstats
path: root/twrp.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2014-11-06 15:35:10 +0100
committerEthan Yonker <dees_troy@teamw.in>2014-11-06 15:35:13 +0100
commita167416289a8aef5d4c35861c9f4181f87b8bfd0 (patch)
treecfb0b940141a4273ac6ddb58070e36ea706b7358 /twrp.cpp
parent2.8.2.0 (diff)
parentUse more aggressive sync writing to applypatch. (diff)
downloadandroid_bootable_recovery-a167416289a8aef5d4c35861c9f4181f87b8bfd0.tar
android_bootable_recovery-a167416289a8aef5d4c35861c9f4181f87b8bfd0.tar.gz
android_bootable_recovery-a167416289a8aef5d4c35861c9f4181f87b8bfd0.tar.bz2
android_bootable_recovery-a167416289a8aef5d4c35861c9f4181f87b8bfd0.tar.lz
android_bootable_recovery-a167416289a8aef5d4c35861c9f4181f87b8bfd0.tar.xz
android_bootable_recovery-a167416289a8aef5d4c35861c9f4181f87b8bfd0.tar.zst
android_bootable_recovery-a167416289a8aef5d4c35861c9f4181f87b8bfd0.zip
Diffstat (limited to '')
-rw-r--r--twrp.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/twrp.cpp b/twrp.cpp
index 7361396ad..2849af759 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -91,7 +91,7 @@ int main(int argc, char **argv) {
property_set("ro.twrp.version", TW_VERSION_STR);
time_t StartupTime = time(NULL);
- printf("Starting TWRP %s on %s", TW_VERSION_STR, ctime(&StartupTime));
+ printf("Starting TWRP %s on %s (pid %d)", TW_VERSION_STR, ctime(&StartupTime), getpid());
// Load default values to set DataManager constants and handle ifdefs
DataManager::SetDefaultValues();
@@ -160,7 +160,7 @@ int main(int argc, char **argv) {
PartitionManager.Mount_By_Path("/cache", true);
string Zip_File, Reboot_Value;
- bool Cache_Wipe = false, Factory_Reset = false, Perform_Backup = false;
+ bool Cache_Wipe = false, Factory_Reset = false, Perform_Backup = false, Shutdown = false;
{
TWPartition* misc = PartitionManager.Find_Partition_By_Path("/misc");
@@ -206,6 +206,8 @@ int main(int argc, char **argv) {
Cache_Wipe = true;
} else if (*argptr == 'n') {
Perform_Backup = true;
+ } else if (*argptr == 'p') {
+ Shutdown = true;
} else if (*argptr == 's') {
ptr = argptr;
index2 = 0;