Reference

libnvmf_kernel_option_supported-libnvme3(2)

Check if the kernel supports an option

NAME

libnvmf_kernel_option_supported - Check if the kernel supports an option

SYNOPSIS

int libnvmf_kernel_option_supported (struct libnvme_global_ctx *ctx , const char *name , bool *supported );

ARGUMENTS

ctx

libnvme global context

name

Option name as the kernel lists it in /dev/nvme-fabrics, e.g. "discovery", "tls", "ctrl_loss_tmo"

supported

Set to true if the kernel supports name

DESCRIPTION

The options are read from /dev/nvme-fabrics once per ctx. The read blocks while another process connects a controller.

RETURN

0 on success, -EINVAL if an argument is NULL, -EOPNOTSUPP if the kernel does not list its options (Linux < 5.17), or another negative error code.