|
|
d41074 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
a85e8e |
From: Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
a85e8e |
Date: Thu, 3 Apr 2014 21:31:12 +0200
|
|
|
d41074 |
Subject: [PATCH] * grub-core/osdep/linux/getroot.c (grub_util_part_to_disk):
|
|
|
d41074 |
Support NVMe device names.
|
|
|
a85e8e |
|
|
|
a85e8e |
---
|
|
|
a85e8e |
grub-core/osdep/linux/getroot.c | 17 +++++++++++++++++
|
|
|
d41074 |
ChangeLog | 5 +++++
|
|
|
a85e8e |
2 files changed, 22 insertions(+)
|
|
|
a85e8e |
|
|
|
a85e8e |
diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
|
|
|
d41074 |
index 19581d32997..7007193d9c7 100644
|
|
|
a85e8e |
--- a/grub-core/osdep/linux/getroot.c
|
|
|
a85e8e |
+++ b/grub-core/osdep/linux/getroot.c
|
|
|
a85e8e |
@@ -896,6 +896,23 @@ grub_util_part_to_disk (const char *os_dev, struct stat *st,
|
|
|
a85e8e |
*pp = '\0';
|
|
|
a85e8e |
return path;
|
|
|
a85e8e |
}
|
|
|
a85e8e |
+
|
|
|
a85e8e |
+ /* If this is a NVMe device */
|
|
|
a85e8e |
+ if ((strncmp ("nvme", p, 4) == 0) && p[4] >= '0' && p[4] <= '9')
|
|
|
a85e8e |
+ {
|
|
|
a85e8e |
+ char *pp = p + 4;
|
|
|
a85e8e |
+ while (*pp >= '0' && *pp <= '9')
|
|
|
a85e8e |
+ pp++;
|
|
|
a85e8e |
+ if (*pp == 'n')
|
|
|
a85e8e |
+ pp++;
|
|
|
a85e8e |
+ while (*pp >= '0' && *pp <= '9')
|
|
|
a85e8e |
+ pp++;
|
|
|
a85e8e |
+ if (*pp == 'p')
|
|
|
a85e8e |
+ *is_part = 1;
|
|
|
a85e8e |
+ /* /dev/nvme[0-9]+n[0-9]+p[0-9]* */
|
|
|
a85e8e |
+ *pp = '\0';
|
|
|
a85e8e |
+ return path;
|
|
|
a85e8e |
+ }
|
|
|
a85e8e |
}
|
|
|
a85e8e |
|
|
|
a85e8e |
return path;
|
|
|
d41074 |
diff --git a/ChangeLog b/ChangeLog
|
|
|
d41074 |
index accffade86b..4a484092a6f 100644
|
|
|
d41074 |
--- a/ChangeLog
|
|
|
d41074 |
+++ b/ChangeLog
|
|
|
d41074 |
@@ -1,3 +1,8 @@
|
|
|
d41074 |
+2014-04-03 Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
d41074 |
+
|
|
|
d41074 |
+ * grub-core/osdep/linux/getroot.c (grub_util_part_to_disk): Support NVMe
|
|
|
d41074 |
+ device names.
|
|
|
d41074 |
+
|
|
|
d41074 |
2014-03-31 Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
|
|
|
d41074 |
|
|
|
d41074 |
btrfs: fix get_root key comparison failures due to endianness
|