HomeFreeBSD

nvmecontrol: Refactor devlist implementation

Description

nvmecontrol: Refactor devlist implementation

Split out helper functions for scan_namespace and scan_controller.
While here, replace sprintf() calls with snprintf() and avoid
leaking the contoller fd if read_controller_data() fails.

Reviewed by: chuck, imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D47354

Details

Provenance
jhbAuthored on Nov 5 2024, 1:28 AM
Reviewer
chuck
Differential Revision
D47354: nvmecontrol: Refactor devlist implementation
Parents
rG8922c5b8211e: nvmf: Fix an off by one error when scanning active namespace IDs
Branches
Unknown
Tags
Unknown