diff options
Diffstat (limited to 'scripts/lib/wic/engine.py')
| -rw-r--r-- | scripts/lib/wic/engine.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py index e169147aba..9f2e87f88b 100644 --- a/scripts/lib/wic/engine.py +++ b/scripts/lib/wic/engine.py | |||
| @@ -232,9 +232,10 @@ def wic_list(args, scripts_path): | |||
| 232 | 232 | ||
| 233 | 233 | ||
| 234 | class Disk: | 234 | class Disk: |
| 235 | def __init__(self, imagepath, native_sysroot): | 235 | def __init__(self, imagepath, native_sysroot, fstypes=('fat',)): |
| 236 | self.imagepath = imagepath | 236 | self.imagepath = imagepath |
| 237 | self.native_sysroot = native_sysroot | 237 | self.native_sysroot = native_sysroot |
| 238 | self.fstypes = fstypes | ||
| 238 | self._partitions = None | 239 | self._partitions = None |
| 239 | self._partimages = {} | 240 | self._partimages = {} |
| 240 | self._lsector_size = None | 241 | self._lsector_size = None |
| @@ -288,7 +289,11 @@ class Disk: | |||
| 288 | if pnum not in self.partitions: | 289 | if pnum not in self.partitions: |
| 289 | raise WicError("Partition %s is not in the image") | 290 | raise WicError("Partition %s is not in the image") |
| 290 | part = self.partitions[pnum] | 291 | part = self.partitions[pnum] |
| 291 | if not part.fstype.startswith("fat"): | 292 | # check if fstype is supported |
| 293 | for fstype in self.fstypes: | ||
| 294 | if part.fstype.startswith(fstype): | ||
| 295 | break | ||
| 296 | else: | ||
| 292 | raise WicError("Not supported fstype: {}".format(part.fstype)) | 297 | raise WicError("Not supported fstype: {}".format(part.fstype)) |
| 293 | if pnum not in self._partimages: | 298 | if pnum not in self._partimages: |
| 294 | tmpf = tempfile.NamedTemporaryFile(prefix="wic-part") | 299 | tmpf = tempfile.NamedTemporaryFile(prefix="wic-part") |
