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
4 changes: 2 additions & 2 deletions libnvme/examples/discover-loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ def discover(host, ctrl, iteration):

slp = ctrl.supported_log_pages()
try:
dlp_supp_opts = slp[nvme.NVME_LOG_LID_DISCOVER] >> 16
dlp_supp_opts = slp[nvme.NVME_LOG_LID_DISCOVERY] >> 16
except (TypeError, IndexError):
dlp_supp_opts = 0

print(f"LID {nvme.NVME_LOG_LID_DISCOVER}h (Discovery), supports: {disc_supp_str(dlp_supp_opts)}")
print(f"LID {nvme.NVME_LOG_LID_DISCOVERY}h (Discovery), supports: {disc_supp_str(dlp_supp_opts)}")

try:
lsp = nvme.NVMF_LOG_DISC_LSP_PLEO if dlp_supp_opts & nvme.NVMF_LOG_DISC_LID_PLEOS else 0
Expand Down
4 changes: 2 additions & 2 deletions libnvme/libnvme/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ except Exception as e:
supported_log_pages = ctrl.supported_log_pages()
try:
# Get the supported options for the Get Discovery Log Page command
dlp_supp_opts = supported_log_pages[nvme.NVME_LOG_LID_DISCOVER] >> 16
dlp_supp_opts = supported_log_pages[nvme.NVME_LOG_LID_DISCOVERY] >> 16
except (TypeError, IndexError):
dlp_supp_opts = 0

print(f"LID {nvme.NVME_LOG_LID_DISCOVER:02x}h (Discovery), supports: {disc_supp_str(dlp_supp_opts)}")
print(f"LID {nvme.NVME_LOG_LID_DISCOVERY:02x}h (Discovery), supports: {disc_supp_str(dlp_supp_opts)}")
try:
lsp = nvme.NVMF_LOG_DISC_LSP_PLEO if dlp_supp_opts & nvme.NVMF_LOG_DISC_LID_PLEOS else 0
log_pages = ctrl.discover(lsp=lsp)
Expand Down
2 changes: 1 addition & 1 deletion libnvme/src/nvme/ioctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -6606,7 +6606,7 @@
* Submits the Get Log Page command specifically for the Host Discovery Log.
* The @allhoste parameter is placed in the Log Specific Parameter (LSP) field.
*
* It automatically sets the Log Identifier (LID) to NVME_LOG_LID_HOST_DISCOVER.
* It automatically sets the Log Identifier (LID) to NVME_LOG_LID_HOST_DISCOVERY.

Check failure on line 6609 in libnvme/src/nvme/ioctl.h

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: line length of 81 exceeds 80 columns
*
* Return: 0 on success, the NVMe command status on error, or a negative
* errno otherwise.
Expand Down