From 144683d7b36c2c0dd06387027928b3cb87efd80a Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Sat, 18 Nov 2023 19:23:52 -0600 Subject: [PATCH] cleanup --- src/drives/fuse/fuse_drive.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/drives/fuse/fuse_drive.cpp b/src/drives/fuse/fuse_drive.cpp index cd827c38..450924c4 100644 --- a/src/drives/fuse/fuse_drive.cpp +++ b/src/drives/fuse/fuse_drive.cpp @@ -351,9 +351,9 @@ auto fuse_drive::fsync_impl(std::string /*api_path*/, int datasync, return open_file->native_operation([&datasync](int handle) -> api_error { if (handle != REPERTORY_INVALID_HANDLE) { #ifdef __APPLE__ - if ((datasync ? fcntl(handle, F_FULLFSYNC) : fsync(handle)) == -1) { + if ((datasync == 0 ? fsync(handle) : fcntl(handle, F_FULLFSYNC)) == -1) { #else // __APPLE__ - if ((datasync ? fdatasync(handle) : fsync(handle)) == -1) { + if ((datasync == 0 ? fsync(handle) : fdatasync(handle)) == -1) { #endif // __APPLE__ return api_error::os_error; } @@ -682,15 +682,9 @@ auto fuse_drive::read_impl(std::string api_path, char *buffer, size_t read_size, return res; } - // event_system::instance().raise( - // __FUNCTION__, api_path, std::to_string(read_size) + ':' + - // std::to_string(read_offset)); data_buffer data; res = open_file->read(read_size, static_cast(read_offset), data); - // event_system::instance().raise( - // __FUNCTION__, api_path, std::to_string(bytes_read) + ':' + - // api_error_to_string(res)); if ((bytes_read = data.size()) != 0U) { std::memcpy(buffer, data.data(), data.size()); data.clear();