diff options
Diffstat (limited to 'fsset.py')
-rw-r--r-- | fsset.py | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -570,6 +570,23 @@ class FileSystemSet: space.sort(spaceSort) return space + def hasDirtyFilesystems(self): + if self.rootOnLoop(): + (rootDev, rootFs) = self.getRootDevice() + mountLoopbackRoot(rootDev, skipMount = 1) + dirty = isys.ext2IsDirty("loop1") + unmountLoopbackRoot(skipMount = 1) + if dirty: return 1 + + for entry in self.entries: + # XXX - multifsify, virtualize isdirty per fstype + if fsystem != "ext2": continue + if doFormat: continue + + if isys.ext2IsDirty(entry.device.getDevice()): return 1 + + return 0 + def umountFilesystems(self, instPath, ignoreErrors = 0): # XXX remove special case try: |