Updated comments for fsdevWriteSafe().

This commit is contained in:
yellows8 2017-11-27 18:43:02 -05:00
parent 59880e9488
commit 02526c920e
2 changed files with 11 additions and 3 deletions

View File

@ -9,7 +9,15 @@
/// Initializes the FS driver. /// Initializes the FS driver.
Result fsdevInit(void); Result fsdevInit(void);
/// Enable/disable copy in fsdev_write /// Enable/disable copy in fsdev_write. This is disabled by default.
/// If it is disabled, you will be unable to write from the following memory-regions(http://switchbrew.org/index.php?title=SVC#MemoryState):
/// MemoryType_Io
/// MemoryType_Normal
/// MemoryType_*SharedMemory
/// MemoryType_ThreadLocal
/// MemoryType_IpcBuffer3
/// MemoryType_KernelStack (This is not mapped in userland anyway)
/// This same restriction applies with reading into the above memory, a file-read version of fsdevWriteSafe() is not available.
void fsdevWriteSafe(bool enable); void fsdevWriteSafe(bool enable);
/// Exits the FS driver. /// Exits the FS driver.

View File

@ -432,11 +432,11 @@ Result fsdevInit(void)
/*! Enable/disable safe fsdev_write /*! Enable/disable safe fsdev_write
* *
* Safe fsdev_write is disabled by default. If it is disabled, you will be * Safe fsdev_write is disabled by default. If it is disabled, you will be
* unable to write from read-only buffers. * unable to write from certain memory-regions.
* *
* @param[in] enable Whether to enable * @param[in] enable Whether to enable
*/ */
void fsdevWriteSafe(bool enable)//TODO: Is this really needed? void fsdevWriteSafe(bool enable)
{ {
if(enable) if(enable)
fsdev_devoptab.write_r = fsdev_write_safe; fsdev_devoptab.write_r = fsdev_write_safe;