Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/libnvme.map
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
LIBNVME_1.13 {
global:
nvme_subsystem_get_fw_rev;
nvme_subsystem_get_model;
};

LIBNVME_1.12 {
global:
nvme_lm_cdq;
Expand Down
10 changes: 10 additions & 0 deletions src/nvme/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,16 @@ const char *nvme_subsystem_get_iopolicy(nvme_subsystem_t s)
return s->iopolicy;
}

const char *nvme_subsystem_get_model(nvme_subsystem_t s)
{
return s->model;
}

const char *nvme_subsystem_get_fw_rev(nvme_subsystem_t s)
{
return s->firmware;
}

nvme_ctrl_t nvme_subsystem_first_ctrl(nvme_subsystem_t s)
{
return list_top(&s->ctrls, struct nvme_ctrl, entry);
Expand Down
16 changes: 16 additions & 0 deletions src/nvme/tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -1346,6 +1346,22 @@ void nvme_subsystem_set_application(nvme_subsystem_t s, const char *a);
*/
const char *nvme_subsystem_get_iopolicy(nvme_subsystem_t s);

/**
* nvme_subsystem_get_model() - Return the model of subsystem
* @s: nvme_subsystem_t object
*
* Return: Model of the current subsystem
*/
const char *nvme_subsystem_get_model(nvme_subsystem_t s);

/**
* nvme_subsystem_get_fw_rev() - Return the firmware rev of subsystem
* @s: nvme_subsystem_t object
*
* Return: Firmware revision of the current subsystem
*/
const char *nvme_subsystem_get_fw_rev(nvme_subsystem_t s);

/**
* nvme_scan_topology() - Scan NVMe topology and apply filter
* @r: nvme_root_t object
Expand Down
Loading