[PATCH] Fix partition naming on loopback devices

5 views
Skip to first unread message

Christian Storm

unread,
Nov 19, 2020, 6:54:06 AM11/19/20
to efibootg...@googlegroups.com, Christian Storm
From: Christian Storm <christi...@siemens.com>

In addition to /dev/mmcblk and /dev/nvme, use the <device>p<num>
partition naming scheme for loopback devices as well.

Signed-off-by: Christian Storm <christi...@siemens.com>
---
env/env_config_partitions.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/env/env_config_partitions.c b/env/env_config_partitions.c
index e22df3d..f4b17e2 100644
--- a/env/env_config_partitions.c
+++ b/env/env_config_partitions.c
@@ -45,6 +45,7 @@ bool probe_config_partitions(CONFIG_PART *cfgpart)
continue;
}
if (strncmp("/dev/mmcblk", dev->path, 11) == 0 ||
+ strncmp("/dev/loop", dev->path, 9) == 0 ||
strncmp("/dev/nvme", dev->path, 9) == 0) {
(void)snprintf(devpath, 4096, "%sp%u",
dev->path, part->num);
--
2.29.2

Jan Kiszka

unread,
Nov 19, 2020, 7:08:31 AM11/19/20
to [ext] Christian Storm, efibootg...@googlegroups.com
Thanks, applied.

Jan

--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
Reply all
Reply to author
Forward
0 new messages