[PATCH 3/8] add function to get the sparc system type

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

 



---
 iutil.py |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/iutil.py b/iutil.py
index 872915d..e275130 100644
--- a/iutil.py
+++ b/iutil.py
@@ -496,6 +496,25 @@ def copyDeviceNode(src, dest):
 
     os.mknod(dest, mode | type, filestat.st_rdev)
 
+## Get the SPARC machine variety type.
+# @return The SPARC machine type, or 0 if not SPARC.
+def getSparcMachine():
+    if not isSPARC():
+        return 0
+
+    machine = None
+
+
+    f = open('/proc/cpuinfo', 'r')
+    lines = f.readlines()
+    f.close()
+    for line in lines:
+        if line.find('type') != -1:
+            machine = line.split(':')[1].strip()
+            return machine
+
+    return None
+
 ## Get the PPC machine variety type.
 # @return The PPC machine type, or 0 if not PPC.
 def getPPCMachine():
-- 
1.7.0

_______________________________________________
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