From 3a5a16f34e6491564b1166332cdf7fdd9069057b Mon Sep 17 00:00:00 2001 From: Ramon Nou Date: Wed, 14 May 2025 20:45:13 +0200 Subject: [PATCH] bugfix of RANGE_FD --- src/client/gkfs_libc.cpp | 2 +- src/client/open_file_map.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/gkfs_libc.cpp b/src/client/gkfs_libc.cpp index 617577309..4584c4deb 100644 --- a/src/client/gkfs_libc.cpp +++ b/src/client/gkfs_libc.cpp @@ -210,7 +210,7 @@ static ResultEntry* results = nullptr; #define GKFS_OPERATION(name, ...) \ if(CTX->interception_enabled() && is_gkfs_fd(fd)) { \ auto res = gkfs::syscall::gkfs_##name(__VA_ARGS__); \ - DEBUG_INFO("[GKFS] (fd={}) -> res {}", fd, res); \ + DEBUG_INFO("[GKFS] {}(fd={}) -> res {}", #name, fd, res); \ return res; \ } diff --git a/src/client/open_file_map.cpp b/src/client/open_file_map.cpp index c54020660..8ccec5f03 100644 --- a/src/client/open_file_map.cpp +++ b/src/client/open_file_map.cpp @@ -164,6 +164,7 @@ OpenFileMap::safe_generate_fd_idx_() { } else { // Return a virtual fd from 10000, but avoid doing all the FD movements if(CTX->range_fd()) { + fd = generate_fd_idx(); if(fd_validation_needed) { while(exist(fd)) { fd = generate_fd_idx(); -- GitLab