summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-09-09 23:55:12 +0000
committerJeremy Katz <katzj@redhat.com>2003-09-09 23:55:12 +0000
commit9b35bd1c169f27c7cde8dbcbbf9fe694891a494c (patch)
tree9227e8a4ef67f96bdc2bf8b092b416baf502bfb0
parent8a83ddd3867398c4a20c307b4a5aa3bbffa79fde (diff)
downloadanaconda-9b35bd1c169f27c7cde8dbcbbf9fe694891a494c.tar.gz
anaconda-9b35bd1c169f27c7cde8dbcbbf9fe694891a494c.tar.xz
anaconda-9b35bd1c169f27c7cde8dbcbbf9fe694891a494c.zip
ext2 is little-endian, always unpack structs that way (#104065)
-rw-r--r--fsset.py2
-rw-r--r--partedUtils.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/fsset.py b/fsset.py
index 16218c9c0..5c306e159 100644
--- a/fsset.py
+++ b/fsset.py
@@ -2112,7 +2112,7 @@ def isValidExt2(device):
if len(buf) != 2048:
return 0
- if struct.unpack("H", buf[1080:1082]) == (0xef53,):
+ if struct.unpack("<H", buf[1080:1082]) == (0xef53,):
return 1
return 0
diff --git a/partedUtils.py b/partedUtils.py
index efc897416..3cdb26a8a 100644
--- a/partedUtils.py
+++ b/partedUtils.py
@@ -394,7 +394,7 @@ def sniffFilesystemType(device):
return None
# ext2 check
- if struct.unpack("H", buf[1080:1082]) == (0xef53,):
+ if struct.unpack("<H", buf[1080:1082]) == (0xef53,):
if isys.ext2HasJournal(dev, makeDevNode = 0):
return "ext3"
else: