DCMD_SDMMC_PART_INFO

Get or clear information about a partition

Synopsis:

#include <hw/dcmd_sim_sdmmc.h>

#define DCMD_SDMMC_PART_INFO   __DIOTF(_DCMD_CAM, _SIM_SDMMC + 10, struct _sdmmc_partition_info)

Arguments to devctl():

Argument Value
filedes A file descriptor that you obtained by opening the device
dcmd DCMD_SDMMC_PART_INFO
dev_data_ptr A pointer to a SDMMC_PARTITION_INFO structure
n_bytes sizeof(SDMMC_PARTITION_INFO)
dev_info_ptr NULL

Description:

This command gets or clears information about a partition. The SDMMC_PARTITION_INFO structure is defined as:

typedef struct _sdmmc_partition_info {
        uint32_t                action;
        uint32_t                rsvd;
        uint32_t                ptype;
        uint32_t                pflags;
        uint64_t                start_lba;
        uint64_t                num_lba;
        uint64_t                rc;
        uint64_t                wc;
        uint64_t                tc;
        uint64_t                ec;
        uint64_t                dc;
        uint32_t                rsvd1[64];
} SDMMC_PARTITION_INFO;

The members include:

action
The action to take; one of:
  • SDMMC_PI_ACTION_GET — get the current values
  • SDMMC_PI_ACTION_CLR — get the current values, and then reset the counters
ptype
The partition type; one of the following:
  • SDMMC_PTYPE_USER
  • SDMMC_PTYPE_BOOT1
  • SDMMC_PTYPE_BOOT2
  • SDMMC_PTYPE_RPMB
  • SDMMC_PTYPE_GP1
  • SDMMC_PTYPE_GP2
  • SDMMC_PTYPE_GP3
  • SDMMC_PTYPE_GP4
pflags
The partition flags; a bitwise OR of the following:
  • SDMMC_PFLAG_WP
  • SDMMC_PFLAG_ENH
  • SDMMC_PFLAG_VIRTUAL
start_lba
The starting logical block address.
num_lba
The number of logical blocks.
rc
The read count (sectors).
wc
The written count (sectors).
tc
The TRIM count (sectors).
ec
The erase count (sectors).
dc
The discard count (sectors).

Input:

Fill in the action.

Output:

The current counts are filled in.

See also:

devctl() in the QNX Neutrino C Library Reference