#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 this function calls the VFDetachDrive and VFInactivateDrive functions 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 in the VFBuffering function.
VFUnmountDrive(W) cannot release the specified drive from mounted status if there are open files and/or directories on the drive (VF_ERR_EACCES), or a write-back to the device failed during unmount (VF_ERR_EIO). In contrast, because VFUnmountDriveForce(W) destroys any opened file information and proceeds with the unmount process, it can release the mounted status of a drive in the states described above. 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