FSVol_Open()
void FSVol_Open (CPU_CHAR *name_vol, CPU_CHAR *name_dev, FS_PARTITION_NBR partition_nbr, FS_ERR *p_err);
File | Called from | Code enabled by |
---|---|---|
| Application | N/A |
Open a volume.
Arguments
name_vol
Volume name. See Device and volume names for information about device names.
name_dev
Device name.
partition_nbr
Partition number. If 0, the default partition will be mounted.
p_err
Pointer to variable that will receive the return error code from this function. See Note #2 .
FS_ERR_NONE
Volume opened.
FS_ERR_DEV_VOL_OPEN
Volume open on device.
FS_ERR_INVALID_SIG
Invalid MBR signature.
FS_ERR_NAME_NULL
Argument name_vol
/ name_dev
passed a NULL pointer.
FS_ERR_PARTITION_INVALID_NBR
Invalid partition number.
FS_ERR_PARTITION_NOT_FOUND
Partition not found.
FS_ERR_VOL_ALREADY_OPEN
Volume is already open.
FS_ERR_VOL_INVALID_NAME
Volume name invalid.
FS_ERR_VOL_NONE_AVAIL
No volumes available.
Or device access error (see Device Error Codes).
Returned Value
None.
Notes/Warnings
- If
FS_ERR_PARTITION_NOT_FOUND
is returned, then no valid partition (or valid file system) was found on the device. It is still placed on the list of used volumes; however, it cannot be addressed as a mounted volume (e.g., files cannot be accessed). Thereafter, unless a new device is inserted, the only valid commands are FSVol_Fmt()
, which creates a file system on the device;FSVol_Close()
, which frees the volume structure;FSVol_Query()
, which returns information about the device.- If
FS_ERR_DEV
,FS_ERR_DEV_NOT_PRESENT
,FS_ERR_DEV_IO
orFS_ERR_DEV_TIMEOUT
is returned, then the volume has been added to the file system, though the underlying device is probably not present. The volume will need to be either closed and re-added, or refreshed.