nvm_dev - Device Management¶
nvm_dev_open¶
nvm_dev_close¶
nvm_dev_openf¶
nvm_dev_attr_pr¶
nvm_dev_pr¶
nvm_dev_get_bbts_cached¶
nvm_dev_get_be_id¶
nvm_dev_get_erase_naddrs_max¶
nvm_dev_get_fd¶
nvm_dev_get_geo¶
nvm_dev_get_lbaf¶
nvm_dev_get_mccap¶
nvm_dev_get_meta_mode¶
nvm_dev_get_mw_cunits¶
nvm_dev_get_name¶
nvm_dev_get_nsid¶
nvm_dev_get_path¶
nvm_dev_get_pmode¶
nvm_dev_get_ppaf¶
nvm_dev_get_ppaf_mask¶
nvm_dev_get_quirks¶
nvm_dev_get_read_naddrs_max¶
nvm_dev_get_verid¶
nvm_dev_get_write_naddrs_max¶
nvm_dev_get_ws_min¶
nvm_dev_get_ws_opt¶
nvm_dev_set_bbts_cached¶
-
int
nvm_dev_set_bbts_cached
(struct nvm_dev * dev, int bbts_cached)¶ Sets whether retrieval and changes to bad-block-tables should be cached.
- Return
- 0 on success, -1 on error and errno set to indicate the error.
- Parameters
dev
: Device handle obtained withnvm_dev_open
bbts_cached
: 1 = cache enabled, 0 = cache disabled
nvm_dev_set_erase_naddrs_max¶
-
int
nvm_dev_set_erase_naddrs_max
(struct nvm_dev * dev, int naddrs)¶ Set the maximum number of addresses to use for erases, that is, when invoking nvm_addr_erase.
- Return
- 0 on success, -1 on error and errno set to indicate the error.
- Parameters
dev
: Device handle obtained withnvm_dev_open
naddrs
: The maximum
nvm_dev_set_meta_mode¶
-
int
nvm_dev_set_meta_mode
(struct nvm_dev * dev, int meta_mode)¶ Set the default ‘meta-mode’ of the given device.
The meta-mode is a setting used by the nvm_vblk interface to write pseudo-meta data to the out-of-bound area.
- Return
- On success, 0 is returned. On error, -1 is returned and errno set to indicate the error.
- Parameters
dev
: Device handle obtained withnvm_dev_open
meta_mode
: One of: NVM_META_MODE_[NONE|ALPHA|CONST]
nvm_dev_set_pmode¶
nvm_dev_set_quirks¶
nvm_dev_set_read_naddrs_max¶
-
int
nvm_dev_set_read_naddrs_max
(struct nvm_dev * dev, int naddrs)¶ Set the maximum number of addresses to use for erases, that is, when invoking nvm_addr_erase.
- Return
- 0 on success, -1 on error and errno set to indicate the error.
- Parameters
dev
: Device handle obtained withnvm_dev_open
naddrs
: The maximum
nvm_dev_set_write_naddrs_max¶
-
int
nvm_dev_set_write_naddrs_max
(struct nvm_dev * dev, int naddrs)¶ Set the maximum number of addresses to use for erases, that is, when invoking nvm_addr_erase.
- Return
- 0 on success, -1 on error and errno set to indicate the error.
- Parameters
dev
: Device handle obtained withnvm_dev_open
naddrs
: The maximum