Remove char/string conversions in fstab processing
There a few char->string conversions between functions which handle different parts of fstab line processing, but there are no uses of string functions. Pass char arrays/pointers around instead. Change-Id: I976a9a54ee8dcfb6194cadcac6a34e467602003b
This commit is contained in:
@@ -90,11 +90,9 @@ int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error)
|
||||
|
||||
if (fstab_line[strlen(fstab_line) - 1] != '\n')
|
||||
fstab_line[strlen(fstab_line)] = '\n';
|
||||
TWPartition* partition = new TWPartition();
|
||||
string line = fstab_line;
|
||||
memset(fstab_line, 0, sizeof(fstab_line));
|
||||
|
||||
if (partition->Process_Fstab_Line(line, Display_Error)) {
|
||||
TWPartition* partition = new TWPartition();
|
||||
if (partition->Process_Fstab_Line(fstab_line, Display_Error)) {
|
||||
if (partition->Is_Storage) {
|
||||
++storageid;
|
||||
partition->MTP_Storage_ID = storageid;
|
||||
@@ -113,6 +111,8 @@ int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error)
|
||||
} else {
|
||||
delete partition;
|
||||
}
|
||||
|
||||
memset(fstab_line, 0, sizeof(fstab_line));
|
||||
}
|
||||
fclose(fstabFile);
|
||||
if (!datamedia && !settings_partition && Find_Partition_By_Path("/sdcard") == NULL && Find_Partition_By_Path("/internal_sd") == NULL && Find_Partition_By_Path("/internal_sdcard") == NULL && Find_Partition_By_Path("/emmc") == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user