smartmontools SVN Rev 5407
Utility to control and monitor storage systems with "S.M.A.R.T."
Classes | Namespaces | Macros | Enumerations | Functions | Variables
nvmecmds.h File Reference
#include "static_assert.h"
#include <stdint.h>
Include dependency graph for nvmecmds.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  smartmontools::nvme_error_log_page
struct  smartmontools::nvme_id_power_state
struct  smartmontools::nvme_id_ctrl
struct  smartmontools::nvme_lbaf
struct  smartmontools::nvme_id_ns
struct  smartmontools::nvme_smart_log


namespace  smartmontools


#define NVMECMDS_H_CVSID   "$Id: nvmecmds.h 5124 2020-12-04 20:40:43Z chrfranke $"


enum  smartmontools::nvme_admin_opcode { smartmontools::nvme_admin_get_log_page = 0x02 , smartmontools::nvme_admin_identify = 0x06 }


 smartmontools::STATIC_ASSERT (sizeof(nvme_error_log_page)==64)
 smartmontools::STATIC_ASSERT (sizeof(nvme_id_power_state)==32)
 smartmontools::STATIC_ASSERT (sizeof(nvme_id_ctrl)==4096)
 smartmontools::STATIC_ASSERT (sizeof(nvme_lbaf)==4)
 smartmontools::STATIC_ASSERT (sizeof(nvme_id_ns)==4096)
 smartmontools::STATIC_ASSERT (sizeof(nvme_smart_log)==512)
bool nvme_read_id_ctrl (nvme_device *device, smartmontools::nvme_id_ctrl &id_ctrl)
bool nvme_read_id_ns (nvme_device *device, unsigned nsid, smartmontools::nvme_id_ns &id_ns)
unsigned nvme_read_log_page (nvme_device *device, unsigned nsid, unsigned char lid, void *data, unsigned size, bool lpo_sup, unsigned offset=0)
unsigned nvme_read_error_log (nvme_device *device, smartmontools::nvme_error_log_page *error_log, unsigned num_entries, bool lpo_sup)
bool nvme_read_smart_log (nvme_device *device, smartmontools::nvme_smart_log &smart_log)


unsigned char nvme_debugmode

Macro Definition Documentation


#define NVMECMDS_H_CVSID   "$Id: nvmecmds.h 5124 2020-12-04 20:40:43Z chrfranke $"

Definition at line 17 of file nvmecmds.h.

Function Documentation

◆ nvme_read_error_log()

unsigned nvme_read_error_log ( nvme_device device,
smartmontools::nvme_error_log_page error_log,
unsigned  num_entries,
bool  lpo_sup 

Definition at line 225 of file nvmecmds.cpp.

◆ nvme_read_id_ctrl()

bool nvme_read_id_ctrl ( nvme_device device,
smartmontools::nvme_id_ctrl id_ctrl 

Definition at line 126 of file nvmecmds.cpp.

◆ nvme_read_id_ns()

bool nvme_read_id_ns ( nvme_device device,
unsigned  nsid,
smartmontools::nvme_id_ns id_ns 

Definition at line 163 of file nvmecmds.cpp.

◆ nvme_read_log_page()

unsigned nvme_read_log_page ( nvme_device device,
unsigned  nsid,
unsigned char  lid,
void *  data,
unsigned  size,
bool  lpo_sup,
unsigned  offset = 0 

Definition at line 202 of file nvmecmds.cpp.

◆ nvme_read_smart_log()

bool nvme_read_smart_log ( nvme_device device,
smartmontools::nvme_smart_log smart_log 

Definition at line 247 of file nvmecmds.cpp.

Variable Documentation

◆ nvme_debugmode

unsigned char nvme_debugmode

Definition at line 27 of file nvmecmds.cpp.