This commit is contained in:
Scott E. Graves 2024-08-02 12:15:15 -05:00
parent 95b88b6ac6
commit 3e5c70e6b4

View File

@ -173,8 +173,6 @@ inline constexpr const auto NANOS_PER_SECOND = 1000000000L;
#endif #endif
#endif #endif
#define WINFSP_ALLOCATION_UNIT UINT64(4096U)
#if defined(_WIN32) #if defined(_WIN32)
#define UTIME_NOW ((1l << 30) - 1l) #define UTIME_NOW ((1l << 30) - 1l)
#define UTIME_OMIT ((1l << 30) - 2l) #define UTIME_OMIT ((1l << 30) - 2l)
@ -193,6 +191,8 @@ using UINT64 = std::uint64_t;
using VOID = void; using VOID = void;
using WCHAR = wchar_t; using WCHAR = wchar_t;
#define WINFSP_ALLOCATION_UNIT UINT64(4096U)
#define FILE_ATTRIBUTE_READONLY 0x00000001 #define FILE_ATTRIBUTE_READONLY 0x00000001
#define FILE_ATTRIBUTE_HIDDEN 0x00000002 #define FILE_ATTRIBUTE_HIDDEN 0x00000002
#define FILE_ATTRIBUTE_SYSTEM 0x00000004 #define FILE_ATTRIBUTE_SYSTEM 0x00000004
@ -226,32 +226,51 @@ using WCHAR = wchar_t;
#define GENERIC_EXECUTE (0x20000000L) #define GENERIC_EXECUTE (0x20000000L)
#define GENERIC_ALL (0x10000000L) #define GENERIC_ALL (0x10000000L)
#define INVALID_FILE_ATTRIBUTES ((DWORD) - 1) #define INVALID_FILE_ATTRIBUTES static_cast<DWORD>(-1)
#define MAX_PATH 260 #define MAX_PATH 260
#define STATUS_SUCCESS std::int32_t(0) #define STATUS_SUCCESS \
#define STATUS_ACCESS_DENIED std::int32_t(0xC0000022L) std::int32_t { 0 }
#define STATUS_DEVICE_BUSY std::int32_t(0x80000011L) #define STATUS_ACCESS_DENIED \
#define STATUS_DEVICE_INSUFFICIENT_RESOURCES std::int32_t(0xC0000468L) std::int32_t { 0xC0000022L }
#define STATUS_DIRECTORY_NOT_EMPTY std::int32_t(0xC0000101L) #define STATUS_DEVICE_BUSY \
#define STATUS_FILE_IS_A_DIRECTORY std::int32_t(0xC00000BAL) std::int32_t { 0x80000011L }
#define STATUS_FILE_TOO_LARGE std::int32_t(0xC0000904L) #define STATUS_DEVICE_INSUFFICIENT_RESOURCES \
#define STATUS_INSUFFICIENT_RESOURCES std::int32_t(0xC000009AL) std::int32_t { 0xC0000468L }
#define STATUS_INTERNAL_ERROR std::int32_t(0xC00000E5L) #define STATUS_DIRECTORY_NOT_EMPTY \
#define STATUS_INVALID_ADDRESS std::int32_t(0xC0000141L) std::int32_t { 0xC0000101L }
#define STATUS_INVALID_HANDLE std::int32_t(0xC0000006L) #define STATUS_FILE_IS_A_DIRECTORY \
#define STATUS_INVALID_IMAGE_FORMAT std::int32_t(0xC000007BL) std::int32_t { 0xC00000BAL }
#define STATUS_INVALID_PARAMETER std::int32_t(0xC000000DL) #define STATUS_FILE_TOO_LARGE \
#define STATUS_NO_MEMORY std::int32_t(0xC0000017L) std::int32_t { 0xC0000904L }
#define STATUS_NOT_IMPLEMENTED std::int32_t(0xC0000002L) #define STATUS_INSUFFICIENT_RESOURCES \
#define STATUS_OBJECT_NAME_EXISTS std::int32_t(0x40000000L) std::int32_t { 0xC000009AL }
#define STATUS_OBJECT_NAME_NOT_FOUND std::int32_t(0xC0000034L) #define STATUS_INTERNAL_ERROR \
#define STATUS_OBJECT_PATH_INVALID std::int32_t(0xC0000039L) std::int32_t { 0xC00000E5L }
#define STATUS_UNEXPECTED_IO_ERROR std::int32_t(0xC00000E9L) #define STATUS_INVALID_ADDRESS \
std::int32_t { 0xC0000141L }
#define STATUS_INVALID_HANDLE \
std::int32_t { 0xC0000006L }
#define STATUS_INVALID_IMAGE_FORMAT \
std::int32_t { 0xC000007BL }
#define STATUS_INVALID_PARAMETER \
std::int32_t { 0xC000000DL }
#define STATUS_NO_MEMORY \
std::int32_t { 0xC0000017L }
#define STATUS_NOT_IMPLEMENTED \
std::int32_t { 0xC0000002L }
#define STATUS_OBJECT_NAME_EXISTS \
std::int32_t { 0x40000000L }
#define STATUS_OBJECT_NAME_NOT_FOUND \
std::int32_t { 0xC0000034L }
#define STATUS_OBJECT_PATH_INVALID \
std::int32_t { 0xC0000039L }
#define STATUS_UNEXPECTED_IO_ERROR \
std::int32_t { 0xC00000E9L }
#define CONVERT_STATUS_NOT_IMPLEMENTED(e) \ #define CONVERT_STATUS_NOT_IMPLEMENTED(e) \
((std::int32_t(e) == STATUS_NOT_IMPLEMENTED) ? -ENOTSUP : e) ((std::int32_t{e} == STATUS_NOT_IMPLEMENTED) ? -ENOTSUP : e)
namespace Fsp::FileSystemBase { namespace Fsp::FileSystemBase {
enum { enum {