From 8b074a3f75e6274c4c016781a70d2ae1c0b5e8d5 Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Thu, 24 Nov 2016 10:26:52 -0500 Subject: [PATCH] wmhdplop: Support NVME devices Patch by GitHub user zen2. https://github.com/d-torrance/wmhdplop/issues/1 --- wmhdplop/devnames.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wmhdplop/devnames.c b/wmhdplop/devnames.c index 9e93ad2..fdade3a 100644 --- a/wmhdplop/devnames.c +++ b/wmhdplop/devnames.c @@ -153,6 +153,14 @@ int device_info(unsigned major, unsigned minor, char *name, int *hd_id, int *par if (part_id) *part_id = 0; return 9; #endif + +#ifdef BLOCK_EXT_MAJOR + case (BLOCK_EXT_MAJOR): + if (name) sprintf(name, "nvme0n%cp%s", "0123456789"[(minor/16)], to_num_(minor)); + if (hd_id) *hd_id = 400 + minor; + if (part_id) *part_id = 0; + return 10; +#endif } if (name) *name = 0; if (hd_id) *hd_id = -1;