Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c358a912 authored by Elliott Hughes's avatar Elliott Hughes Committed by Automerger Merge Worker
Browse files

Merge "Remove Windows workaround in file not built for Windows." into main am:...

Merge "Remove Windows workaround in file not built for Windows." into main am: d091aa44 am: 503121cc am: c1342bc8 am: 00f96820

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2760267



Change-Id: I1a8f1e6b865e0937620b54ef66ed53bc7c762d28
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 38e5d473 00f96820
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -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;
}