mfsHSetVolumeAttr
Syntax
s32 mfsHSetVolumeAttr(s32 drive, u8 attr)

Arguments

drive   Drive name ('A', 'B', ...)
attr   Attribute

Return value

Error

Function

Sets volume attribute

Description

This function sets the attribute of the drive specified by drive to attr. The following attributes can be specified.

MFS_VOLUME_ATTR_VPROTECT_WRITE 0x20 Volume write protected
MFS_VOLUME_ATTR_VPROTECT_READ 0x40 Volume read protected
MFS_VOLUME_ATTR_WPROTECT 0x80 Write protected

When the MFS_VOLUME_ATTR_VPROTECT_WRITE bit is 1, it indicates that the disk is write protected from other games. The disk can be written to only when the company code and game code specified by the mfsHInit*Boot() or mfsSetGameCode() function match the company code and game code written in the system ID area of the disk.

When the MFS_VOLUME_ATTR_VPROTECT_READ bit is 1, it indicates that the disk is read protected from other games. The disk can be read from only when the company code and game code specified by the mfsHInit*Boot() or mfsSetGameCode() function match the company code and game code written in the system ID area of the disk.

When MFS_VOLUME_ATTR_WPROTECT is specified, the disk is write protected from all games.

Main errors

MFS_ERR_NO Normal termination
MFS_ERR_NOTFOUND Drive not found
MFS_ERR_DEVICE Device error
An error occurred in an internally called Leo function.
Since a Leo function error is stored in the variable mfsError, check this variable to perform processing.
MFS_ERR_PROTECT Write protected
The volume attribute is write protected, or the medium is volume protected.