about summary refs log tree commit diff stats
path: root/src/wrapped
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-03-08 21:38:42 +0100
committerptitSeb <sebastien.chev@gmail.com>2021-03-08 21:38:42 +0100
commit22b4b9c18d5a2fd2ae4d4547ee2abe0657735290 (patch)
treeb9056b5f48b96b435449b35ea8270b9bc4531eb8 /src/wrapped
parentd31a6c0ba68f75c82f14d423eed7c93ebadda324 (diff)
downloadbox64-22b4b9c18d5a2fd2ae4d4547ee2abe0657735290.tar.gz
box64-22b4b9c18d5a2fd2ae4d4547ee2abe0657735290.zip
Remove isCpuTopology function call to the open wrapped functions that is not needed
Diffstat (limited to 'src/wrapped')
-rwxr-xr-xsrc/wrapped/wrappedlibc.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c
index f097a437..81e20343 100755
--- a/src/wrapped/wrappedlibc.c
+++ b/src/wrapped/wrappedlibc.c
@@ -1485,17 +1485,6 @@ EXPORT int32_t my_open64(x64emu_t* emu, void* pathname, int32_t flags, uint32_t
         lseek(tmp, 0, SEEK_SET);
         return tmp;
     }
-    if(isCpuTopology((const char*)pathname)!=-1) {
-        int n = isCpuTopology((const char*)pathname);
-        char buf[512];
-        snprintf(buf, 512, TMP_CPUTOPO, n);
-        int tmp = shm_open(buf, O_RDWR | O_CREAT, S_IRWXU);
-        if(tmp<0) return open64(pathname, flags, mode); // error fallback
-        shm_unlink(buf);    // remove the shm file, but it will still exist because it's currently in use
-        CreateCPUTopologyCoreID(tmp, n);
-        lseek(tmp, 0, SEEK_SET);
-        return tmp;
-    }
     #endif
     return open64(pathname, flags, mode);
 }
@@ -1521,17 +1510,6 @@ EXPORT FILE* my_fopen(x64emu_t* emu, const char* path, const char* mode)
         lseek(tmp, 0, SEEK_SET);
         return fdopen(tmp, mode);
     }
-    if(isCpuTopology(path)!=-1) {
-        int n = isCpuTopology(path);
-        char buf[512];
-        snprintf(buf, 512, TMP_CPUTOPO, n);
-        int tmp = shm_open(buf, O_RDWR | O_CREAT, S_IRWXU);
-        if(tmp<0) return fopen(path, mode); // error fallback
-        shm_unlink(buf);    // remove the shm file, but it will still exist because it's currently in use
-        CreateCPUTopologyCoreID(tmp, n);
-        lseek(tmp, 0, SEEK_SET);
-        return fdopen(tmp, mode);;
-    }
     #endif
     if(isProcSelf(path, "exe")) {
         return fopen(emu->context->fullpath, mode);
@@ -1560,17 +1538,6 @@ EXPORT FILE* my_fopen64(x64emu_t* emu, const char* path, const char* mode)
         lseek(tmp, 0, SEEK_SET);
         return fdopen(tmp, mode);
     }
-    if(isCpuTopology(path)!=-1) {
-        int n = isCpuTopology(path);
-        char buf[512];
-        snprintf(buf, 512, TMP_CPUTOPO, n);
-        int tmp = shm_open(buf, O_RDWR | O_CREAT, S_IRWXU);
-        if(tmp<0) return fopen(path, mode); // error fallback
-        shm_unlink(buf);    // remove the shm file, but it will still exist because it's currently in use
-        CreateCPUTopologyCoreID(tmp, n);
-        lseek(tmp, 0, SEEK_SET);
-        return fdopen(tmp, mode);;
-    }
     #endif
     if(isProcSelf(path, "exe")) {
         return fopen64(emu->context->fullpath, mode);