Update ContentRedirectionStatus values and rename CONTENT_REDIRECTION_RESULT_INVALID_ARG to CONTENT_REDIRECTION_RESULT_INVALID_ARGUMENT

This commit is contained in:
Maschell 2022-09-03 16:39:40 +02:00
parent 115a92e83a
commit e04619c84f
2 changed files with 12 additions and 12 deletions

View File

@ -38,15 +38,15 @@ enum FSLayerType {
typedef enum ContentRedirectionStatus {
CONTENT_REDIRECTION_RESULT_SUCCESS = 0,
CONTENT_REDIRECTION_RESULT_MODULE_NOT_FOUND = -1,
CONTENT_REDIRECTION_RESULT_MODULE_MISSING_EXPORT = -2,
CONTENT_REDIRECTION_RESULT_UNSUPPORTED_VERSION = -3,
CONTENT_REDIRECTION_RESULT_INVALID_ARG = -10,
CONTENT_REDIRECTION_RESULT_NO_MEMORY = -11,
CONTENT_REDIRECTION_RESULT_UNKNOWN_FS_LAYER_TYPE = -12,
CONTENT_REDIRECTION_RESULT_LAYER_NOT_FOUND = -13,
CONTENT_REDIRECTION_RESULT_LIB_UNINITIALIZED = -20,
CONTENT_REDIRECTION_RESULT_UNKNOWN_ERROR = -1000,
CONTENT_REDIRECTION_RESULT_MODULE_NOT_FOUND = -0x1,
CONTENT_REDIRECTION_RESULT_MODULE_MISSING_EXPORT = -0x2,
CONTENT_REDIRECTION_RESULT_UNSUPPORTED_VERSION = -0x3,
CONTENT_REDIRECTION_RESULT_INVALID_ARGUMENT = -0x10,
CONTENT_REDIRECTION_RESULT_NO_MEMORY = -0x11,
CONTENT_REDIRECTION_RESULT_UNKNOWN_FS_LAYER_TYPE = -0x12,
CONTENT_REDIRECTION_RESULT_LAYER_NOT_FOUND = -0x13,
CONTENT_REDIRECTION_RESULT_LIB_UNINITIALIZED = -0x20,
CONTENT_REDIRECTION_RESULT_UNKNOWN_ERROR = -0x1000,
} ContentRedirectionStatus;
typedef uint32_t CRLayerHandle;

View File

@ -76,7 +76,7 @@ ContentRedirectionStatus ContentRedirection_AddFSLayer(CRLayerHandle *handlePtr,
}
switch (res) {
case CONTENT_REDIRECTION_API_ERROR_INVALID_ARG:
return CONTENT_REDIRECTION_RESULT_INVALID_ARG;
return CONTENT_REDIRECTION_RESULT_INVALID_ARGUMENT;
case CONTENT_REDIRECTION_API_ERROR_NO_MEMORY:
return CONTENT_REDIRECTION_RESULT_NO_MEMORY;
case CONTENT_REDIRECTION_API_ERROR_UNKNOWN_FS_LAYER_TYPE:
@ -126,7 +126,7 @@ ContentRedirectionStatus ContentRedirection_AddDevice(const devoptab_t *device,
}
if (resultOut == nullptr) {
return CONTENT_REDIRECTION_RESULT_INVALID_ARG;
return CONTENT_REDIRECTION_RESULT_INVALID_ARGUMENT;
}
*resultOut = reinterpret_cast<decltype(&AddDevice)>(sCRAddDevice)(device);
@ -138,7 +138,7 @@ ContentRedirectionStatus ContentRedirection_RemoveDevice(const char *name, int *
return CONTENT_REDIRECTION_RESULT_LIB_UNINITIALIZED;
}
if (resultOut == nullptr) {
return CONTENT_REDIRECTION_RESULT_INVALID_ARG;
return CONTENT_REDIRECTION_RESULT_INVALID_ARGUMENT;
}
*resultOut = reinterpret_cast<decltype(&RemoveDevice)>(sCRRemoveDevice)(name);
return CONTENT_REDIRECTION_RESULT_SUCCESS;