[efibootguard][PATCH] Fix handling of partitions on nvme drives

5 views
Skip to first unread message

Dmitri Toubelis

unread,
Apr 25, 2019, 1:15:03 PM4/25/19
to efibootg...@googlegroups.com, Dmitri Toubelis
This patch fixes an issue with using `bg_printenv` and `bg_setenv` tools
on devices with NVMe drives. Currently these utilities throw an error
when used with NVMe drives.

Signed-off-by: Dmitri Toubelis <dmitri....@litmusautomation.com>
---
env/env_config_partitions.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/env/env_config_partitions.c b/env/env_config_partitions.c
index b4ffc6c..6a79a45 100644
--- a/env/env_config_partitions.c
+++ b/env/env_config_partitions.c
@@ -42,7 +42,8 @@ bool probe_config_partitions(CONFIG_PART *cfgpart)
part = ped_disk_next_partition(pd, part);
continue;
}
- if (strncmp("/dev/mmcblk", dev->path, 11) == 0) {
+ if (strncmp("/dev/mmcblk", dev->path, 11) == 0 ||
+ strncmp("/dev/nvme", dev->path, 9) == 0) {
(void)snprintf(devpath, 4096, "%sp%u",
dev->path, part->num);
} else {
--
2.7.4

Reply all
Reply to author
Forward
0 new messages