#include <revolution/vf.h>
typedef s32 VFErr;
VFErr VFUnmountDrive( const char* drive );
VFErr VFUnmountDriveW( const VFWchar* drive );
VFErr VFUnmountDriveForce( const char* drive );
VFErr VFUnmountDriveForceW( const VFWchar* drive );
drive |
The name of the drive to be unmounted. Specify a single letter. |
Returns 0 when successful.
Otherwise, returns VFErr other than 0.
Disables and unmounts the specified drive. The name of the drive can be specified from A to Z. Since VFDetachDrive() and VFInactivateDrive() are called internally, they are not needed when VFUnmountDrive() is used.
As a result of this process, all of the data in the VF cache is written back to the media and the cache buffer is completely deallocated.
The data in VF cache is written back to the media and the cache buffer is released even if VF_WRITE_BACK_CACHE has been specified as the mode for VFBuffering.VFUnmountDrive(W) cannot release mounted status if there are open files and/or directories on the specified drive (VF_ERR_EACCES), or a write-back to the device failed during unmount (VF_ERR_EIO).
However, VFUnmountDriveForce(W) can unmount a drive in the state described above by destroying the information in any open files and continuing with unmounting. In this case, the data of the open file may not be reflected correctly on the media.
VFMountDrive, VFDetachDrive, VFInactivateDrive
2006/11/09
2007/05/08 Revised the text about the cache.
CONFIDENTIAL