[efibootguard][PATCH v2] Fix issue with partition naming on NVMe drives

14 views
Skip to first unread message

Dmitri Toubelis

unread,
Apr 25, 2019, 1:57:21 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 b7aea8b..e22df3d 100644
--- a/env/env_config_partitions.c
+++ b/env/env_config_partitions.c
@@ -44,7 +44,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

Jan Kiszka

unread,
Apr 26, 2019, 3:34:40 AM4/26/19
to Dmitri Toubelis, efibootg...@googlegroups.com
Thanks, looks good - but what was the reason for v2? I cannot spot a difference.

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

dmitri....@litmusautomation.com

unread,
Apr 26, 2019, 9:39:46 AM4/26/19
to EFI Boot Guard
It is probably not significant but UI was on the wrong branch when creating the patch, so I re-created it from latest master. But they look identical otherwise.

Jan Kiszka

unread,
Apr 26, 2019, 10:25:03 AM4/26/19
to dmitri....@litmusautomation.com, EFI Boot Guard
On 26.04.19 15:39, dmitri....@litmusautomation.com wrote:
> It is probably not significant but UI was on the wrong branch when creating the
> patch, so I re-created it from latest master. But they look identical otherwise.
>

Ok. I was just asking to avoid that there is a real difference somewhere,
typically unsaved in some editor...

Applied to next, thanks.

Jan

> On Friday, April 26, 2019 at 3:34:40 AM UTC-4, Jan Kiszka wrote:
>
> On 25.04.19 19:57, Dmitri Toubelis wrote:
> > 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
> <javascript:>>
> > ---
> >   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 b7aea8b..e22df3d 100644
> > --- a/env/env_config_partitions.c
> > +++ b/env/env_config_partitions.c
> > @@ -44,7 +44,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 {
> >
>
> Thanks, looks good - but what was the reason for v2? I cannot spot a
> difference.
>
> Jan
>
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux
>
> --
> You received this message because you are subscribed to the Google Groups "EFI
> Boot Guard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to efibootguard-d...@googlegroups.com
> <mailto:efibootguard-d...@googlegroups.com>.
> To post to this group, send email to efibootg...@googlegroups.com
> <mailto:efibootg...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/efibootguard-dev/fad7ab27-b39c-41de-bbf7-88a85f325f5a%40googlegroups.com
> <https://groups.google.com/d/msgid/efibootguard-dev/fad7ab27-b39c-41de-bbf7-88a85f325f5a%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages