refactor
This commit is contained in:
		| @@ -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<gid_t>(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, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user