FMD_GetBlockStatus (Windows Embedded CE 6.0)

1/6/2010

This function returns the status of a block.

Syntax

DWORD FMD_GetBlockStatus(
  BLOCK_ID blockID
);

Parameters

  • blockID
    [in] The block number used to check status.

Return Value

The following table shows the flags that can be returned to describe the status of the block.

Flag Description

BLOCK_STATUS_UNKNOWN

The status could not be determined as a result of a read error.

BLOCK_STATUS_BAD

The block is bad.

BLOCK_STATUS_READONLY

The block is read-only.

BLOCK_STATUS_RESERVED

The block is reserved.

BLOCK_STATUS_XIP

The block is an execute-in-place (XIP) block. This flag is returned by a flash media driver (FMD) if the driver is in update mode and the block identifier that is being queried is an XIP block. The BLOCK_STATUS_XIP flag is only returned if the run-time image is an update loader image. If the run-time image is not an update loader image, this function returns BLOCK_STATUS_READONLY for an XIP block as data cannot be written to the block.

Remarks

It is the responsibility of the caller of the FMD to check and interpret the block status. If the FMD is used with the FAL, then a read-only block will be mapped to a logical sector but will not allow write access. A reserved block will not be mapped to a logical sector and therefore will not be used by the FAL. A bad block will be ignored.

Requirements

Header fmd.h
Library Developer Implemented
Windows Embedded CE Windows CE .NET 4.2 and later

See Also

Reference

Flash Media Driver Functions

Other Resources

Flash Drivers
Flash Media Driver Reference