libsmart.c
/**
 * Create a map of SMART values
 */
Create a map of SMART values
Create a map of SMART values
static void
__smart_attribute_map(smart_h h, smart_buf_t *sb, smart_map_t *sm)
{
	if (!sb || !sm) {
		return;
	}
	switch (sb->protocol) {
	case SMART_PROTO_ATA:
		__smart_map_ata(h, sb, sm);
		break;
	case SMART_PROTO_NVME:
		__smart_map_nvme(sb, sm);
		break;
	case SMART_PROTO_SCSI:
		__smart_map_scsi(h, sb, sm);
		break;
	default:
		sm->count = 0;
	}
}
static void __smart_attribute_map ( smart_h h , smart_buf_t * sb , smart_map_t * sm ) { if ( ! sb || ! sm ) { return ; } switch ( sb -> protocol ) { case SMART_PROTO_ATA : __smart_map_ata ( h , sb , sm ) ; break ; case SMART_PROTO_NVME : __smart_map_nvme ( sb , sm ) ; break ; case SMART_PROTO_SCSI : __smart_map_scsi ( h , sb , sm ) ; break ; default : sm -> count = 0 ; } }
Create a map of SMART values
Create a map of SMART values