diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/wic/engine.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py index eafc6c783e..c6a63f2080 100644 --- a/scripts/lib/wic/engine.py +++ b/scripts/lib/wic/engine.py | |||
@@ -234,7 +234,7 @@ def wic_list(args, scripts_path): | |||
234 | 234 | ||
235 | 235 | ||
236 | class Disk: | 236 | class Disk: |
237 | def __init__(self, imagepath, native_sysroot, fstypes=('fat',)): | 237 | def __init__(self, imagepath, native_sysroot, fstypes=('fat', 'ext')): |
238 | self.imagepath = imagepath | 238 | self.imagepath = imagepath |
239 | self.native_sysroot = native_sysroot | 239 | self.native_sysroot = native_sysroot |
240 | self.fstypes = fstypes | 240 | self.fstypes = fstypes |
@@ -280,7 +280,7 @@ class Disk: | |||
280 | def __getattr__(self, name): | 280 | def __getattr__(self, name): |
281 | """Get path to the executable in a lazy way.""" | 281 | """Get path to the executable in a lazy way.""" |
282 | if name in ("mdir", "mcopy", "mdel", "mdeltree", "sfdisk", "e2fsck", | 282 | if name in ("mdir", "mcopy", "mdel", "mdeltree", "sfdisk", "e2fsck", |
283 | "resize2fs", "mkswap", "mkdosfs"): | 283 | "resize2fs", "mkswap", "mkdosfs", "debugfs"): |
284 | aname = "_%s" % name | 284 | aname = "_%s" % name |
285 | if aname not in self.__dict__: | 285 | if aname not in self.__dict__: |
286 | setattr(self, aname, find_executable(name, self.paths)) | 286 | setattr(self, aname, find_executable(name, self.paths)) |
@@ -314,9 +314,14 @@ class Disk: | |||
314 | seek=self.partitions[pnum].start) | 314 | seek=self.partitions[pnum].start) |
315 | 315 | ||
316 | def dir(self, pnum, path): | 316 | def dir(self, pnum, path): |
317 | return exec_cmd("{} -i {} ::{}".format(self.mdir, | 317 | if self.partitions[pnum].fstype.startswith('ext'): |
318 | self._get_part_image(pnum), | 318 | return exec_cmd("{} {} -R 'ls -l {}'".format(self.debugfs, |
319 | path)) | 319 | self._get_part_image(pnum), |
320 | path), as_shell=True) | ||
321 | else: # fat | ||
322 | return exec_cmd("{} -i {} ::{}".format(self.mdir, | ||
323 | self._get_part_image(pnum), | ||
324 | path)) | ||
320 | 325 | ||
321 | def copy(self, src, pnum, path): | 326 | def copy(self, src, pnum, path): |
322 | """Copy partition image into wic image.""" | 327 | """Copy partition image into wic image.""" |