Write correct mount Opts in fstab
Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
Change-Id: I4049be4a693bde3f1bc3a088ce864eca5515ae5f
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 75fdb5d..1533bf7 100755
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -362,7 +362,8 @@
}
for (iter = Partitions.begin(); iter != Partitions.end(); iter++) {
if ((*iter)->Can_Be_Mounted) {
- Line = (*iter)->Actual_Block_Device + " " + (*iter)->Mount_Point + " " + (*iter)->Current_File_System + " rw 0 0\n";
+ Line = (*iter)->Actual_Block_Device + " " + (*iter)->Mount_Point + " " + (*iter)->Current_File_System +
+ ((*iter)->Mount_Read_Only ? " ro " : " rw ") + "0 0\n";
fputs(Line.c_str(), fp);
}
// Handle subpartition tracking