summaryrefslogtreecommitdiffstats
path: root/partition.cpp
diff options
context:
space:
mode:
authorbigbiff bigbiff <bigbiff@teamw.in>2013-10-12 02:28:00 +0200
committerDees Troy <dees_troy@teamw.in>2013-10-23 21:27:48 +0200
commitd0c24c50d9857254f5d32cf53adb0091ceaa1fa6 (patch)
tree891df97429b1c72eeba6f7b2ac4c26a997ab88b4 /partition.cpp
parentMerge "Remove trailing spaces on auto generated backup names" into android-4.3 (diff)
downloadandroid_bootable_recovery-d0c24c50d9857254f5d32cf53adb0091ceaa1fa6.tar
android_bootable_recovery-d0c24c50d9857254f5d32cf53adb0091ceaa1fa6.tar.gz
android_bootable_recovery-d0c24c50d9857254f5d32cf53adb0091ceaa1fa6.tar.bz2
android_bootable_recovery-d0c24c50d9857254f5d32cf53adb0091ceaa1fa6.tar.lz
android_bootable_recovery-d0c24c50d9857254f5d32cf53adb0091ceaa1fa6.tar.xz
android_bootable_recovery-d0c24c50d9857254f5d32cf53adb0091ceaa1fa6.tar.zst
android_bootable_recovery-d0c24c50d9857254f5d32cf53adb0091ceaa1fa6.zip
Diffstat (limited to 'partition.cpp')
-rw-r--r--partition.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/partition.cpp b/partition.cpp
index c1c99f6f2..10cfb9f27 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -53,6 +53,9 @@ extern "C" {
#include "make_ext4fs.h"
#endif
}
+#ifdef HAVE_SELINUX
+#include "selinux/selinux.h"
+#endif
using namespace std;
@@ -1272,6 +1275,12 @@ bool TWPartition::Wipe_EXT4() {
LOGERR("Unable to wipe '%s' using function call.\n", Mount_Point.c_str());
return false;
} else {
+ #ifdef HAVE_SELINUX
+ string sedir = Mount_Point + "/lost+found";
+ PartitionManager.Mount_By_Path(sedir.c_str(), true);
+ rmdir(sedir.c_str());
+ mkdir(sedir.c_str(), S_IRWXU | S_IRWXG | S_IWGRP | S_IXGRP);
+ #endif
return true;
}
#else