[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH 1/2] Look at CPU flags instead of /proc/iomem to determine PAE-ness (#484941).
- From: Chris Lumens <clumens redhat com>
- To: anaconda-devel-list redhat com
- Cc:
- Subject: [PATCH 1/2] Look at CPU flags instead of /proc/iomem to determine PAE-ness (#484941).
- Date: Tue, 17 Mar 2009 13:59:17 -0400
---
isys/isys.py | 22 +++++++---------------
1 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/isys/isys.py b/isys/isys.py
index 07c69a0..4b95810 100755
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -664,22 +664,14 @@ def isPaeAvailable():
if not iutil.isX86():
return isPAE
- try:
- f = open("/proc/iomem", "r")
- lines = f.readlines()
- for line in lines:
- if line[0].isspace():
- continue
- start = line.split(' ')[0].split('-')[0]
- start = long(start, 16)
-
- if start >= 0x100000000L:
- isPAE = True
- break
+ f = open("/proc/cpuinfo", "r")
+ lines = f.readlines()
+ f.close()
- f.close()
- except:
- pass
+ for line in lines:
+ if line.startswith("flags") and line.find("pae") != -1:
+ isPAE = True
+ break
return isPAE
--
1.6.1.3
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]