DCMD_MMCSD_WRITE_PROTECT
QNX SDP8.0Devctl and Ioctl CommandsDeveloper
Clear or set write protection
Synopsis:
#include <hw/dcmd_sim_mmcsd.h>
#define DCMD_MMCSD_WRITE_PROTECT __DIOTF(_DCMD_CAM, _SIM_MMCSD + 1, struct _mmcsd_write_protect)
Arguments to devctl():
Argument | Value |
---|---|
filedes | A file descriptor that you obtained by opening the device |
dcmd | DCMD_MMCSD_WRITE_PROTECT |
dev_data_ptr | A pointer to a MMCSD_WRITE_PROTECT structure (see below) |
n_bytes | sizeof(MMCSD_WRITE_PROTECT) |
dev_info_ptr | NULL |
Description:
This command clears or sets write protection.
Input:
A filled-in MMCSD_WRITE_PROTECT structure:
typedef struct _mmcsd_write_protect {
uint32_t action;
uint32_t mode;
uint64_t lba;
uint64_t nlba;
uint64_t rsvd2;
} MMCSD_WRITE_PROTECT;
The members include:
- action
- The action to take; one of:
- MMCSD_WP_ACTION_CLR — remove write protection
- MMCSD_WP_ACTION_SET — set write protection
- mode
- The bits include:
- MMCSD_WP_MODE_PWR_WP_EN — apply power-on period protection
- lba
- The logical block address to start at.
- nlba
- The number of logical blocks.
Output:
None.
See also:
devctl() in the QNX OS C Library Reference
Page updated: