Skip to content

Commit cd12387

Browse files
committed
tree: support apple-nvme transport
Apple silicon support on Linux uses a separate platform driver called 'apple-nvme', and libnvme doesn't know about this transport. This fixes a "No transport address for 'apple-nvme'" error when running on Apple silicon, where libnvme was unable to enumerate nvme storage attached to this platform. $ nvme list Node Generic SN Model Namespace Usage Format FW Rev --------------------- --------------------- -------------------- ---------------------------------------- ---------- -------------------------- ---------------- -------- /dev/nvme0n1 /dev/ng0n1 xxxxxxxxxxxxxxxx APPLE SSD AP2048Z 0x1 2.00 TB / 2.00 TB 4 KiB + 0 B 532.140. ... Signed-off-by: Clayton Craft <[email protected]>
1 parent b325953 commit cd12387

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/nvme/tree.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1417,7 +1417,8 @@ struct nvme_ctrl *nvme_create_ctrl(nvme_root_t r,
14171417
return NULL;
14181418
}
14191419
if (strncmp(transport, "loop", 4) &&
1420-
strncmp(transport, "pcie", 4) && !traddr) {
1420+
strncmp(transport, "pcie", 4) &&
1421+
strncmp(transport, "apple-nvme", 10) && !traddr) {
14211422
nvme_msg(r, LOG_ERR, "No transport address for '%s'\n",
14221423
transport);
14231424
errno = EINVAL;

0 commit comments

Comments
 (0)