@@ -291,7 +291,7 @@ TWPartition::~TWPartition(void) {
291
291
// Do nothing
292
292
}
293
293
294
- bool TWPartition::Process_Fstab_Line (const char *fstab_line, bool Display_Error, std::map<string, Flags_Map> *twrp_flags, bool Sar_Detect ) {
294
+ bool TWPartition::Process_Fstab_Line (const char *fstab_line, bool Display_Error, std::map<string, Flags_Map> *twrp_flags) {
295
295
char full_line[MAX_FSTAB_LINE_LENGTH];
296
296
char twflags[MAX_FSTAB_LINE_LENGTH] = " " ;
297
297
char * ptr;
@@ -339,12 +339,11 @@ bool TWPartition::Process_Fstab_Line(const char *fstab_line, bool Display_Error,
339
339
Mount_Point = ptr;
340
340
if (fstab_version == 2 && Is_Super == false ) {
341
341
additional_entry = PartitionManager.Find_Partition_By_Path (Mount_Point);
342
- if (!Sar_Detect && additional_entry) {
342
+ if (additional_entry) {
343
343
LOGINFO (" Found an additional entry for '%s'\n " , Mount_Point.c_str ());
344
344
}
345
345
}
346
- if (!Sar_Detect)
347
- LOGINFO (" Processing '%s'\n " , Mount_Point.c_str ());
346
+ LOGINFO (" Processing '%s'\n " , Mount_Point.c_str ());
348
347
Backup_Path = Mount_Point;
349
348
Storage_Path = Mount_Point;
350
349
Display_Name = ptr + 1 ;
@@ -436,12 +435,7 @@ bool TWPartition::Process_Fstab_Line(const char *fstab_line, bool Display_Error,
436
435
if (Primary_Block_Device.find (" *" ) != string::npos)
437
436
Wildcard_Block_Device = true ;
438
437
439
- if (Sar_Detect) {
440
- if (Is_File_System (Fstab_File_System) && (Mount_Point == " /" || Mount_Point == " /system" || Mount_Point == " /system_root" ))
441
- Find_Actual_Block_Device ();
442
- else
443
- return true ;
444
- } else if (Mount_Point == " auto" ) {
438
+ if (Mount_Point == " auto" ) {
445
439
Mount_Point = " /auto" ;
446
440
char autoi[5 ];
447
441
sprintf (autoi, " %i" , auto_index);
@@ -470,6 +464,9 @@ bool TWPartition::Process_Fstab_Line(const char *fstab_line, bool Display_Error,
470
464
Setup_File_System (Display_Error);
471
465
Backup_Name = Display_Name = Mount_Point.substr (1 , Mount_Point.size () - 1 );
472
466
if (Mount_Point == " /" || Mount_Point == " /system" || Mount_Point == " /system_root" ) {
467
+ Mount_Point = PartitionManager.Get_Android_Root_Path ();
468
+ Backup_Path = Mount_Point;
469
+ Storage_Path = Mount_Point;
473
470
Display_Name = " System" ;
474
471
Backup_Name = " system" ;
475
472
Backup_Display_Name = Display_Name;
@@ -646,24 +643,6 @@ bool TWPartition::Process_Fstab_Line(const char *fstab_line, bool Display_Error,
646
643
}
647
644
}
648
645
649
- if (Is_File_System (Fstab_File_System) && (Mount_Point == " /" || Mount_Point == " /system" || Mount_Point == " /system_root" )) {
650
- if (Sar_Detect) {
651
- Mount_Point = " /s" ;
652
- Mount_Read_Only = true ;
653
- Can_Be_Mounted = true ;
654
- } else {
655
- Mount_Point = PartitionManager.Get_Android_Root_Path ();
656
- Backup_Path = Mount_Point;
657
- Storage_Path = Mount_Point;
658
- Make_Dir (Mount_Point, Display_Error);
659
- }
660
- if (Is_Super) {
661
- Can_Be_Backed_Up = false ;
662
- Can_Be_Wiped = false ;
663
- Wipe_Available_in_GUI = false ;
664
- }
665
- }
666
-
667
646
return true ;
668
647
}
669
648
@@ -3101,7 +3080,7 @@ bool TWPartition::Find_Wildcard_Block_Devices(const string& Device) {
3101
3080
TWPartition *part = new TWPartition;
3102
3081
char buffer[MAX_FSTAB_LINE_LENGTH];
3103
3082
sprintf (buffer, " %s %s-%i auto defaults defaults" , item.c_str (), Mount_Point.c_str (), ++mount_point_index);
3104
- part->Process_Fstab_Line (buffer, false , NULL , false );
3083
+ part->Process_Fstab_Line (buffer, false , NULL );
3105
3084
char display[MAX_FSTAB_LINE_LENGTH];
3106
3085
sprintf (display, " %s %i" , Storage_Name.c_str (), mount_point_index);
3107
3086
part->Storage_Name = display;
0 commit comments