From: Aleksandar Nikolic <[email protected]>

In case wks file references nvme0n1, update_fstab() function creates wrong 
entries
in /etc/fstab, as it is not adding prefix 'p' before the partition number (at 
the
moment this happens only for mmcblk). This leads that entries in /etc/fstab 
start
with:

    /dev/nvme0n11
    /dev/nvme0n13

instead with:

    /dev/nvme0n1p1
    /dev/nvme0n1p3

The patch fixes this as it extends the if condition and adds prefix 'p' for
both mmcblk and nvme0n1.

Signed-off-by: Aleksandar Nikolic <[email protected]>
---
 scripts/lib/wic/plugins/imager/direct.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/wic/plugins/imager/direct.py 
b/scripts/lib/wic/plugins/imager/direct.py
index a1d152659b..5600d72e61 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -133,8 +133,8 @@ class DirectPlugin(ImagerPlugin):
             elif part.use_label:
                 device_name = "LABEL=%s" % part.label
             else:
-                # mmc device partitions are named mmcblk0p1, mmcblk0p2..
-                prefix = 'p' if  part.disk.startswith('mmcblk') else ''
+                # mmc and nvme0n1 device partitions are named <disk>p1, 
<disk>p2..
+                prefix = 'p' if  part.disk.startswith(('mmcblk', 'nvme0n1')) 
else ''
                 device_name = "/dev/%s%s%d" % (part.disk, prefix, part.realnum)
 
             opts = part.fsopts if part.fsopts else "defaults"
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#237524): 
https://lists.openembedded.org/g/openembedded-core/message/237524
Mute This Topic: https://lists.openembedded.org/mt/119436831/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to