Merge "Remove Windows workaround in file not built for Windows." into main am: d091aa44b3
am: 503121ccea
am: c1342bc826
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2760267 Change-Id: Idddeafe897f09c3810408a62ffb5a45b1973b799 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
00f9682031
1 changed files with 2 additions and 6 deletions
|
@ -41,10 +41,6 @@
|
|||
|
||||
#include "fs_config.h"
|
||||
|
||||
#ifndef O_BINARY
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
|
||||
using android::base::EndsWith;
|
||||
using android::base::StartsWith;
|
||||
|
||||
|
@ -257,12 +253,12 @@ static int fs_config_open(int dir, int which, const char* target_out_path) {
|
|||
len = strip(target_out_path, len, "/");
|
||||
len = strip(target_out_path, len, "/system");
|
||||
if (asprintf(&name, "%.*s%s", (int)len, target_out_path, conf[which][dir]) != -1) {
|
||||
fd = TEMP_FAILURE_RETRY(open(name, O_RDONLY | O_BINARY));
|
||||
fd = TEMP_FAILURE_RETRY(open(name, O_RDONLY));
|
||||
free(name);
|
||||
}
|
||||
}
|
||||
if (fd < 0) {
|
||||
fd = TEMP_FAILURE_RETRY(open(conf[which][dir], O_RDONLY | O_BINARY));
|
||||
fd = TEMP_FAILURE_RETRY(open(conf[which][dir], O_RDONLY));
|
||||
}
|
||||
return fd;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue