Page MenuHomeFreeBSD

nvmecontrol: Factor out namespace Identify printing
AcceptedPublic

Authored by ken on Wed, Sep 9, 3:29 PM.

Details

Reviewers
imp
Group Reviewers
cam
Summary

Move print_namespace() from identify.c to identify_ext.c and rename
it to nvme_print_namespace(), to match nvme_print_controller().
This allows other consumers (notably camcontrol(8)) to print NVMe
namespace Identify data.

No functional changes intended.

sbin/nvmecontrol/identify.c:

Remove print_namespace(), and call nvme_print_namespace()
instead.

sbin/nvmecontrol/identify_ext.c:

Add nvme_print_namespace(), moved here from identify.c.

sbin/nvmecontrol/nvmecontrol.h:

Remove the print_namespace() prototype.

sbin/nvmecontrol/nvmecontrol_ext.h:

Add the nvme_print_namespace() prototype.

sbin/nvmecontrol/ns.c:

Include nvmecontrol_ext.h, and rename print_namespace() calls
to nvme_print_namespace().

Sponsored by: Spectra Logic

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 76695
Build 73578: arc lint + arc unit