[PATCH 08/11] wmhdplop: Support NVME devices

Doug Torrance <[email protected]>
Newsgroups gmane.compw.window-managers.windowmaker.devel
Message-ID <[email protected]>
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;
-- 
2.7.4


-- 
To unsubscribe, send mail to [email protected].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.