Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.TH "libnvme_free_nbft" 9 "libnvme_free_nbft" "April 2026" "libnvme API manual" LINUX
.TH "libnvmf_free_nbft" 9 "libnvmf_free_nbft" "April 2026" "libnvme API manual" LINUX
.SH NAME
libnvme_free_nbft \- Free the struct libnbft_info and its contents
libnvmf_free_nbft \- Free the struct libnbft_info and its contents
.SH SYNOPSIS
.B "void" libnvme_free_nbft
.B "void" libnvmf_free_nbft
.BI "(struct libnvme_global_ctx *ctx " ","
.BI "struct libnbft_info *nbft " ");"
.SH ARGUMENTS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.TH "libnvme_read_nbft" 9 "libnvme_read_nbft" "April 2026" "libnvme API manual" LINUX
.TH "libnvmf_read_nbft" 9 "libnvmf_read_nbft" "April 2026" "libnvme API manual" LINUX
.SH NAME
libnvme_read_nbft \- Read and parse contents of an ACPI NBFT table
libnvmf_read_nbft \- Read and parse contents of an ACPI NBFT table
.SH SYNOPSIS
.B "int" libnvme_read_nbft
.B "int" libnvmf_read_nbft
.BI "(struct libnvme_global_ctx *ctx " ","
.BI "struct libnbft_info **nbft " ","
.BI "const char *filename " ");"
Expand Down
6 changes: 3 additions & 3 deletions libnvme/doc/rst/nbft.rst
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@



.. c:function:: int libnvme_read_nbft (struct libnvme_global_ctx *ctx, struct libnbft_info **nbft, const char *filename)
.. c:function:: int libnvmf_read_nbft (struct libnvme_global_ctx *ctx, struct libnbft_info **nbft, const char *filename)

Read and parse contents of an ACPI NBFT table

Expand All @@ -449,14 +449,14 @@
**Description**

Read and parse the specified NBFT file into a struct libnbft_info.
Free with libnvme_free_nbft().
Free with libnvmf_free_nbft().

**Return**

0 on success, errno otherwise.


.. c:function:: void libnvme_free_nbft (struct libnvme_global_ctx *ctx, struct libnbft_info *nbft)
.. c:function:: void libnvmf_free_nbft (struct libnvme_global_ctx *ctx, struct libnbft_info *nbft)

Free the struct libnbft_info and its contents

Expand Down
4 changes: 2 additions & 2 deletions libnvme/libnvme/nvme.i
Original file line number Diff line number Diff line change
Expand Up @@ -1368,13 +1368,13 @@ struct libnvme_ns {
PyObject *output;
int ret;

ret = libnvme_read_nbft(ctx, &nbft, filename);
ret = libnvmf_read_nbft(ctx, &nbft, filename);
if (ret) {
Py_RETURN_NONE;
}

output = nbft_to_pydict(nbft);
libnvme_free_nbft(ctx, nbft);
libnvmf_free_nbft(ctx, nbft);
return output;
}
%};
Expand Down
2 changes: 0 additions & 2 deletions libnvme/src/libnvme.ld
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ LIBNVME_3 {
libnvme_free_ctrl;
libnvme_free_global_ctx;
libnvme_free_host;
libnvme_free_nbft;
libnvme_free_ns;
libnvme_free_subsystem;
libnvme_gen_dhchap_key;
Expand Down Expand Up @@ -178,7 +177,6 @@ LIBNVME_3 {
libnvme_read_hostid;
libnvme_read_hostnqn;
libnvme_read_key;
libnvme_read_nbft;
libnvme_refresh_topology;
libnvme_rescan_ctrl;
libnvme_rescan_ns;
Expand Down
2 changes: 2 additions & 0 deletions libnvme/src/libnvmf.ld
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ LIBNVMF_3 {
libnvmf_discovery_nbft;
libnvmf_eflags_str;
libnvmf_exat_ptr_next;
libnvmf_free_nbft;
libnvmf_get_default_trsvcid;
libnvmf_get_discovery_log;
libnvmf_is_registration_supported;
libnvmf_nbft_free;
libnvmf_nbft_read_files;
libnvmf_prtype_str;
libnvmf_qptype_str;
libnvmf_read_nbft;
libnvmf_register_ctrl;
libnvmf_sectype_str;
libnvmf_subtype_str;
Expand Down
4 changes: 2 additions & 2 deletions libnvme/src/nvme/fabrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -2600,7 +2600,7 @@ __public int libnvmf_nbft_read_files(struct libnvme_global_ctx *ctx, char *path,
snprintf(filename, sizeof(filename), "%s/%s", path,
dent[i]->d_name);

ret = libnvme_read_nbft(ctx, &nbft, filename);
ret = libnvmf_read_nbft(ctx, &nbft, filename);
if (!ret) {
struct nbft_file_entry *new;

Expand Down Expand Up @@ -2630,7 +2630,7 @@ __public void libnvmf_nbft_free(struct libnvme_global_ctx *ctx, struct nbft_file
while (head) {
struct nbft_file_entry *next = head->next;

libnvme_free_nbft(ctx, head->nbft);
libnvmf_free_nbft(ctx, head->nbft);
free(head);

head = next;
Expand Down
6 changes: 3 additions & 3 deletions libnvme/src/nvme/nbft.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@
return 0;
}

__public void libnvme_free_nbft(struct libnvme_global_ctx *ctx, struct libnbft_info *nbft)
__public void libnvmf_free_nbft(struct libnvme_global_ctx *ctx, struct libnbft_info *nbft)

Check failure on line 713 in libnvme/src/nvme/nbft.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: line length of 90 exceeds 80 columns
{
struct libnbft_hfi **hfi;
struct libnbft_security **sec;
Expand All @@ -736,7 +736,7 @@
free(nbft);
}

__public int libnvme_read_nbft(struct libnvme_global_ctx *ctx, struct libnbft_info **nbft,
__public int libnvmf_read_nbft(struct libnvme_global_ctx *ctx, struct libnbft_info **nbft,

Check failure on line 739 in libnvme/src/nvme/nbft.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: line length of 90 exceeds 80 columns
const char *filename)
{
__u8 *raw_nbft = NULL;
Expand Down Expand Up @@ -800,7 +800,7 @@

if (parse_raw_nbft(ctx, *nbft)) {
libnvme_msg(ctx, LIBNVME_LOG_ERR, "Failed to parse %s\n", filename);
libnvme_free_nbft(ctx, *nbft);
libnvmf_free_nbft(ctx, *nbft);
return -EINVAL;
}
return 0;
Expand Down
10 changes: 5 additions & 5 deletions libnvme/src/nvme/nbft.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,26 +246,26 @@
};

/**
* libnvme_read_nbft() - Read and parse contents of an ACPI NBFT table
* libnvmf_read_nbft() - Read and parse contents of an ACPI NBFT table
*
* @ctx: struct libnvme_global_ctx object
* @nbft: Parsed NBFT table data.
* @filename: Filename of the raw NBFT table to read.
*
* Read and parse the specified NBFT file into a struct libnbft_info.
* Free with libnvme_free_nbft().
* Free with libnvmf_free_nbft().
*
* Return: 0 on success, errno otherwise.
*/
int libnvme_read_nbft(struct libnvme_global_ctx *ctx, struct libnbft_info **nbft,
int libnvmf_read_nbft(struct libnvme_global_ctx *ctx, struct libnbft_info **nbft,

Check failure on line 260 in libnvme/src/nvme/nbft.h

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: line length of 81 exceeds 80 columns
const char *filename);

/**
* libnvme_free_nbft() - Free the struct libnbft_info and its contents
* libnvmf_free_nbft() - Free the struct libnbft_info and its contents
* @ctx: struct libnvme_global_ctx object
* @nbft: Parsed NBFT table data.
*/
void libnvme_free_nbft(struct libnvme_global_ctx *ctx, struct libnbft_info *nbft);
void libnvmf_free_nbft(struct libnvme_global_ctx *ctx, struct libnbft_info *nbft);

Check failure on line 268 in libnvme/src/nvme/nbft.h

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: line length of 82 exceeds 80 columns

/**
* struct nbft_file_entry - Linked list entry for NBFT files
Expand Down
4 changes: 4 additions & 0 deletions libnvme/src/nvme/private.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
#include <sys/stat.h>
#include <sys/types.h>

#if defined(HAVE_NETDB) || defined(CONFIG_FABRICS)
#include <ifaddrs.h>
#endif

#include <ccan/list/list.h>

#include "nvme/nvme-types.h"
Expand Down
4 changes: 2 additions & 2 deletions libnvme/test/nbft/nbft-dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ int main(int argc, char **argv)
return 1;
}

if (libnvme_read_nbft(ctx, &table, argv[1]) != 0) {
if (libnvmf_read_nbft(ctx, &table, argv[1]) != 0) {
fprintf(stderr, "Error parsing the NBFT table %s: %m\n",
argv[1]);
libnvme_free_global_ctx(ctx);
Expand All @@ -127,7 +127,7 @@ int main(int argc, char **argv)

print_nbft(table);

libnvme_free_nbft(ctx, table);
libnvmf_free_nbft(ctx, table);
libnvme_free_global_ctx(ctx);
return 0;
}
Loading