summaryrefslogtreecommitdiffstats
path: root/isys/isys.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2004-12-23 16:09:32 +0000
committerJeremy Katz <katzj@redhat.com>2004-12-23 16:09:32 +0000
commit5fa3aa363ea5f434e93dcc60c01b1708618068c5 (patch)
tree1b3619ef67815dd47fbd754ca2e354a6c848abf1 /isys/isys.py
parenta766c942cce257de8dcd878e74bd5e4f1d084c85 (diff)
downloadanaconda-5fa3aa363ea5f434e93dcc60c01b1708618068c5.tar.gz
anaconda-5fa3aa363ea5f434e93dcc60c01b1708618068c5.tar.xz
anaconda-5fa3aa363ea5f434e93dcc60c01b1708618068c5.zip
2004-12-23 Jeremy Katz <katzj@redhat.com>
* isys/isys.py (readSwapLabel_int): Update for newer swap label format (#143447)
Diffstat (limited to 'isys/isys.py')
-rw-r--r--isys/isys.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/isys/isys.py b/isys/isys.py
index 71e8fef41..80a37c34f 100644
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -635,8 +635,9 @@ def readSwapLabel_int(device):
except:
return label
+ pagesize = getpagesize()
try:
- buf = os.read(fd, getpagesize())
+ buf = os.read(fd, pagesize)
os.close(fd)
except OSError, e:
log("error reading swap label on %s: %s" %(device, e))
@@ -646,8 +647,8 @@ def readSwapLabel_int(device):
pass
return label
- if ((len(buf) == getpagesize()) and (buf[pagesize - 10:] == "SWAPSPACE2")):
- label = string.rstrip(buf[32:48], "\0x00")
+ if ((len(buf) == pagesize) and (buf[pagesize - 10:] == "SWAPSPACE2")):
+ label = string.rstrip(buf[1052:1068], "\0x00")
return label
def readSwapLabel(device, makeDevNode = 1):