#include <revolution/vf.h>
typedef s32 VFErr;
VFErr VFInactivateDrive( const char* drive );
VFErr VFInactivateDriveW( const VFWchar* drive );
VFErr VFInactivateDriveForce( const char* drive );
VFErr VFInactivateDriveForceW( const VFWchar* drive );
drive |
The name of the mounted drive. Specify a single letter. |
Returns 0 when successful.
Otherwise, returns VFErr other than 0.
Disables an already mounted drive. Call the separate function, VFDetachDrive(), as reservations will not be cleared otherwise. The name of the drive can be specified from A to Z.
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.VFInactiveDrive(W) cannot deactivate the drive if there are open files and/or directories on the specified drive (VF_ERR_EACCES) or a write-back to the device failed during deactivation (VF_ERR_EIO).
In contrast, VFInactiveDriveForce(W) can deactivate a drive in the states described above, because it destroys any opened file information and proceeds with the unmount process. In this case, the data of the open file may not be reflected correctly on the media.
VFActivateDrive, VFUnmountDrive
2006/11/09
2007/05/08 Revised the text about the cache.
CONFIDENTIAL