[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH 02/47] Remove partedUtils.sniffFilesystemType()
- From: David Cantrell <dcantrell redhat com>
- To: anaconda-devel-list redhat com
- Cc:
- Subject: [PATCH 02/47] Remove partedUtils.sniffFilesystemType()
- Date: Wed, 11 Feb 2009 14:53:37 -1000
This function is just a pass-through for isys.readFSType().
---
exception.py | 2 +-
fsset.py | 2 +-
partedUtils.py | 7 -------
partitions.py | 11 +++++------
4 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/exception.py b/exception.py
index 214ca87..78e4b66 100644
--- a/exception.py
+++ b/exception.py
@@ -349,7 +349,7 @@ def copyExceptionToDisk(anaconda, device):
os.close(fd)
- fstype = partedUtils.sniffFilesystemType(device)
+ fstype = isys.readFSType(device)
if fstype == None:
fstype = 'vfat'
try:
diff --git a/fsset.py b/fsset.py
index c1d47b5..89f099b 100644
--- a/fsset.py
+++ b/fsset.py
@@ -2995,7 +2995,7 @@ def readFstab (anaconda):
# if we fail at all, though, just ignore it
if fsystem == "auto" and device.getDevice() != "none":
try:
- tmp = partedUtils.sniffFilesystemType("/dev/%s" %(device.setupDevice(),))
+ tmp = isys.readFSType("/dev/%s" %(device.setupDevice(),))
if tmp is not None:
fsystem = tmp
except:
diff --git a/partedUtils.py b/partedUtils.py
index abc5795..c170368 100644
--- a/partedUtils.py
+++ b/partedUtils.py
@@ -462,13 +462,6 @@ def isLinuxNativeByNumtype(numtype):
return 0
-def sniffFilesystemType(device):
- """Sniff to determine the type of fs on device.
-
- device - name of device to sniff.
- """
- return isys.readFSType(device)
-
def getReleaseString(mountpoint):
if os.access(mountpoint + "/etc/redhat-release", os.R_OK):
f = open(mountpoint + "/etc/redhat-release", "r")
diff --git a/partitions.py b/partitions.py
index 74a9e11..fc4c554 100644
--- a/partitions.py
+++ b/partitions.py
@@ -311,7 +311,7 @@ class Partitions:
continue
device = partedUtils.get_partition_name(part)
- fs = partedUtils.sniffFilesystemType("/dev/%s" % (device,))
+ fs = isys.readFSType("/dev/%s" % (device,))
if fs and fs.endswith("raid"):
part = disk.next_partition(part)
continue
@@ -400,8 +400,7 @@ class Partitions:
# parted doesn't tell ext4 from ext3
if ptype == fsset.fileSystemTypeGet("ext3"):
- fsname = partedUtils.sniffFilesystemType("/dev/%s" %
- device)
+ fsname = isys.readFSType("/dev/%s" % (device,))
try:
ptype = fsset.fileSystemTypeGet(fsname)
except:
@@ -410,7 +409,7 @@ class Partitions:
luksDev = self.encryptedDevices.get(device)
if luksDev and not luksDev.openDevice():
mappedDev = luksDev.getDevice()
- fsname = partedUtils.sniffFilesystemType("/dev/%s" % mappedDev)
+ fsname = isys.readFSType("/dev/%s" % (mappedDev,))
try:
ptype = fsset.fileSystemTypeGet(fsname)
except:
@@ -482,7 +481,7 @@ class Partitions:
else:
device = theDev
- fs = partedUtils.sniffFilesystemType("/dev/%s" %(device,))
+ fs = isys.readFSType("/dev/%s" %(device,))
try:
fsystem = fsset.fileSystemTypeGet(fs)
except:
@@ -559,7 +558,7 @@ class Partitions:
else:
device = theDev
- fs = partedUtils.sniffFilesystemType(device)
+ fs = isys.readFSType(device)
fslabel = None
try:
--
1.6.1.3
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]