From 6e5247495332fa8eb4dd3efb759e8eadbe0baab5 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Fri, 27 Sep 2024 14:03:36 -0500 Subject: [PATCH] refactor --- .../src/drives/fuse/fuse_drive_base.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/repertory/librepertory/src/drives/fuse/fuse_drive_base.cpp b/repertory/librepertory/src/drives/fuse/fuse_drive_base.cpp index 77f30739..2c9d32c6 100644 --- a/repertory/librepertory/src/drives/fuse/fuse_drive_base.cpp +++ b/repertory/librepertory/src/drives/fuse/fuse_drive_base.cpp @@ -222,7 +222,7 @@ auto fuse_drive_base::get_flags_from_meta(const api_meta_map &meta) -> __uint32_t { return utils::string::to_uint32(meta.at(META_OSXFLAGS)); } -#endif // __APPLE__ +#endif // defined(__APPLE__) auto fuse_drive_base::get_gid_from_meta(const api_meta_map &meta) -> gid_t { return static_cast(utils::string::to_uint32(meta.at(META_GID))); @@ -250,11 +250,11 @@ auto fuse_drive_base::get_uid_from_meta(const api_meta_map &meta) -> uid_t { auto fuse_drive_base::parse_xattr_parameters( const char *name, const uint32_t &position, std::string &attribute_name, const std::string &api_path) -> api_error { -#else +#else // !defined(__APPLE__) auto fuse_drive_base::parse_xattr_parameters( const char *name, std::string &attribute_name, const std::string &api_path) -> api_error { -#endif +#endif // defined(__APPLE__) auto res = api_path.empty() ? api_error::bad_address : api_error::success; if (res != api_error::success) { return res; @@ -275,7 +275,7 @@ auto fuse_drive_base::parse_xattr_parameters( ((attribute_name != XATTR_RESOURCEFORK_NAME) && (position != 0))) { return api_error::invalid_operation; } -#endif +#endif // defined(__APPLE__) return api_error::success; } @@ -285,12 +285,12 @@ auto fuse_drive_base::parse_xattr_parameters( const char *name, const char *value, size_t size, const uint32_t &position, std::string &attribute_name, const std::string &api_path) -> api_error { auto res = parse_xattr_parameters(name, position, attribute_name, api_path); -#else +#else // !defined(__APPLE__) auto fuse_drive_base::parse_xattr_parameters( const char *name, const char *value, size_t size, std::string &attribute_name, const std::string &api_path) -> api_error { auto res = parse_xattr_parameters(name, attribute_name, api_path); -#endif +#endif // defined(__APPLE__) if (res != api_error::success) { return res; } @@ -334,13 +334,13 @@ void fuse_drive_base::populate_stat(const std::string &api_path, set_timespec_from_meta(meta, META_CREATION, st->st_birthtimespec); set_timespec_from_meta(meta, META_CHANGED, st->st_ctimespec); set_timespec_from_meta(meta, META_ACCESSED, st->st_atimespec); -#else // __APPLE__ +#else // !defined(__APPLE__) st->st_blksize = 4096; set_timespec_from_meta(meta, META_MODIFIED, st->st_mtim); set_timespec_from_meta(meta, META_CREATION, st->st_ctim); set_timespec_from_meta(meta, META_ACCESSED, st->st_atim); -#endif // __APPLE__ +#endif // defined(__APPLE__) } void fuse_drive_base::set_timespec_from_meta(const api_meta_map &meta,