summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/imager/direct.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py
index 6b2ab3368e..b1dc3e96f4 100644
--- a/scripts/lib/wic/imager/direct.py
+++ b/scripts/lib/wic/imager/direct.py
@@ -100,10 +100,18 @@ class DirectImageCreator(BaseImageCreator):
100 for num, p in enumerate(parts, 1): 100 for num, p in enumerate(parts, 1):
101 if not p.mountpoint or p.mountpoint == "/" or p.mountpoint == "/boot": 101 if not p.mountpoint or p.mountpoint == "/" or p.mountpoint == "/boot":
102 continue 102 continue
103 if self._ptable_format == 'msdos' and num > 3: 103
104 device_name = "/dev/" + p.disk + str(num + 1) 104 part = ''
105 else: 105 # mmc device partitions are named mmcblk0p1, mmcblk0p2..
106 device_name = "/dev/" + p.disk + str(num) 106 if p.disk.startswith('mmcblk'):
107 part = 'p'
108
109 pnum = num
110 if self._ptable_format == 'msdos' and pnum > 3:
111 # account for logical partition numbering, ex. sda5..
112 pnum += 1
113
114 device_name = "/dev/" + p.disk + part + str(pnum)
107 115
108 opts = "defaults" 116 opts = "defaults"
109 if p.fsopts: 117 if p.fsopts: