FSSetEmulatedError

Syntax

#include <cafe/fs.h>

FSStatus FSSetEmulatedError(FSClient *client, FSError error);

Parameters

client Client to set emulated error.
error Error code to emulate.
Specifying FS_ERROR_OK cancels the emulation.
Otherwise error must be negative.
Emulating FS_ERROR_MEDIA_NOT_READY is not supported.

Return Values

FS_STATUS_OK Successfully set emulated error code.
FS_STATUS_FATAL_ERROR client is invalid address, or error is out of supported range.

Description

Sets error code to emulate with specified client. Following commands queued to this client will fail with specified error code.

To start error emulation, set error to a negative error code. Specifying FS_ERROR_MEDIA_NOT_READY, FS_ERROR_INVALID_MEDIA and FS_ERROR_MEDIA_ERROR are not supported. To stop error emulation, set error to FS_ERROR_OK.

Do Not Call From

Production code Do not call this function in production code. It is available only for debugging purposes.

See Also

Debug
FSGetEmulatedError
FSError

Revision History

2013/05/08 Automated cleanup pass.
2013/05/07 Added that FS_ERROR_INVALID_MEDIA and FS_ERROR_MEDIA_ERROR are not supported.
2013/02/07 Corrected misleading expression.
2012/08/27 Added the warning about calling this function in the retail version.
2012/08/16 Initial version.


CONFIDENTIAL