--- system-config-lvm-1.1.1/src/Filesystem.py 2007-10-08 21:45:44.000000000 +0000 +++ system-config-lvm-1.1.1-ori/src/Filesystem.py 2006-12-18 18:56:32.000000000 +0000 @@ -1,7 +1,6 @@ import re import os -import os.path from execute import execWithCapture, execWithCaptureErrorStatus, execWithCaptureStatus, execWithCaptureProgress, execWithCaptureErrorStatusProgress, execWithCaptureStatusProgress from CommandError import * @@ -57,7 +56,7 @@ def get_filesystems(): # NoFS has to be first - return [NoFS(), ext3(), ext2(), gfs2(), gfs2_clustered(), gfs(), gfs_clustered(),swap()] + return [NoFS(), ext3(), ext2(), gfs2(), gfs2_clustered(), gfs(), gfs_clustered()] class Filesystem: @@ -143,9 +142,9 @@ class Unknown(Filesystem): def __init__(self, name=_('Unknown filesystem'), mountable=False): Filesystem.__init__(self, name, False, False, mountable, - False, False, False, False,'none') - - + False, False, False, False, + 'unknown') + class ext3(Filesystem): def __init__(self): @@ -864,24 +863,4 @@ dlg.destroy() return rc -class swap(Filesystem): - def __init__(self): - creatable = self.check_path('/sbin/mkswap') - mountable = self.check_mountable('swap', 'swap') - - Filesystem.__init__(self, 'swap', creatable, True, mountable, - False, False, False, False, - 'swap') - def create(self, path): - args = list() - args.append("/sbin/mkswap") - args.append(" -L ") - args.append( os.path.basename(path) ) - args.append(" ") - args.append(path) - cmdstr = ' '.join(args) - msg = CREATING_FS % (self.name) - o,e,r = execWithCaptureErrorStatusProgress("/sbin/mkswap", args, msg) - if r != 0: - raise CommandError('FATAL', FSCREATE_FAILURE % (cmdstr,e))