Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

FS_PARTITION_NBR  FSDev_PartitionAdd (CPU_CHAR    *name_dev,
                                      FS_SEC_QTY   partition_size,
                                      FS_ERR      *p_err);

File

Called from

Code enabled by

fs_dev.c

Application

FS_CFG_PARTITION_EN and not FS_CFG_RD_ONLY_EN

Adds a partition to a device. See also section 7-5 “Partitions”.

Arguments

name_dev

Device name

partition_size

Size, in sectors, of the partition to add.

p_err

Pointer to variable that will receive return error code from this function.

FS_ERR_NONE

Partition added.

FS_ERR_INVALID_PARTITION

Invalid partition.

FS_ERR_INVALID_SEC_NBR

Sector start or count invalid.

FS_ERR_INVALID_SIG

Invalid MBR signature.

FS_ERR_NAME_NULL

Argument name_dev passed a NULL pointer.

Or device access error (see section B-4 “Device Error Codes”).

Returned Value

The index of the created partition. The first partition on the device has an index of 0. FS_INVALID_PARTITION_NBR is returned if the function fails to add the partition.

Notes/Warnings

Device state change will result from device I/O, not present or timeout error.

  • No labels