syscall_emul.hh (13936:4fd3a0a20e0e) syscall_emul.hh (13994:a18a6bb72a49)
1/*
2 * Copyright (c) 2012-2013, 2015 ARM Limited
3 * Copyright (c) 2015 Advanced Micro Devices, Inc.
4 * All rights reserved
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating

--- 920 unchanged lines hidden (view full) ---

929 * the open call failed.
930 *
931 * Any success will set sim_fd to something other than -1 and skip the
932 * next conditions effectively bypassing them.
933 */
934 int sim_fd = -1;
935 std::string used_path;
936 std::vector<std::string> special_paths =
1/*
2 * Copyright (c) 2012-2013, 2015 ARM Limited
3 * Copyright (c) 2015 Advanced Micro Devices, Inc.
4 * All rights reserved
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating

--- 920 unchanged lines hidden (view full) ---

929 * the open call failed.
930 *
931 * Any success will set sim_fd to something other than -1 and skip the
932 * next conditions effectively bypassing them.
933 */
934 int sim_fd = -1;
935 std::string used_path;
936 std::vector<std::string> special_paths =
937 { "/proc/meminfo/", "/system/", "/sys/", "/platform/",
938 "/etc/passwd" };
937 { "/proc/meminfo/", "/system/", "/platform/", "/etc/passwd" };
939 for (auto entry : special_paths) {
940 if (startswith(path, entry)) {
941 sim_fd = OS::openSpecialFile(abs_path, p, tc);
942 used_path = abs_path;
943 }
944 }
945 if (sim_fd == -1) {
946 sim_fd = open(redir_path.c_str(), host_flags, mode);

--- 1934 unchanged lines hidden ---
938 for (auto entry : special_paths) {
939 if (startswith(path, entry)) {
940 sim_fd = OS::openSpecialFile(abs_path, p, tc);
941 used_path = abs_path;
942 }
943 }
944 if (sim_fd == -1) {
945 sim_fd = open(redir_path.c_str(), host_flags, mode);

--- 1934 unchanged lines hidden ---