def _initFilesystemInfo(self): """Initialize filesystem to device mappings.""" self._mapFSpathDev = {} fsinfo = FilesystemInfo() for fs in fsinfo.getFSlist(): devpath = fsinfo.getFSdev(fs) dev = self._getUniqueDev(devpath) if dev is not None: self._mapFSpathDev[fs] = dev
def _initFilesystemInfo(self): """Initialize filesystem to device mappings.""" self._mapFSpathDev = {} fsinfo = FilesystemInfo() if self._diskStats is None: self._initDiskStats() for fs in fsinfo.getFSlist(): devpath = fsinfo.getFSdev(fs) if re.match('\/dev\/', devpath): mobj = re.match('\/dev\/(.*)$', os.path.realpath(devpath)) if mobj: self._mapFSpathDev[fs] = mobj.group(1)