[PATCH 1/2] Look at CPU flags instead of /proc/iomem to determine PAE-ness (#484941).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 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

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux