[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH 1/2] Support a 'ppc64' arch in iutil.getArch.
- From: Bill Nottingham <notting redhat com>
- To: anaconda-devel-list redhat com
- Cc: Bill Nottingham <notting redhat com>
- Subject: [PATCH 1/2] Support a 'ppc64' arch in iutil.getArch.
- Date: Tue, 7 Jul 2009 22:37:59 -0400
Signed-off-by: Bill Nottingham <notting redhat com>
---
iutil.py | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/iutil.py b/iutil.py
index 49509e9..1e652ec 100644
--- a/iutil.py
+++ b/iutil.py
@@ -635,8 +635,16 @@ def isX86(bits=None):
return False
-def isPPC():
- return os.uname()[4].startswith('ppc')
+def isPPC(bits=None):
+ if bits is None:
+ return os.uname()[4].startswith('ppc')
+ elif bits == 32:
+ if arch == 'ppc':
+ return True
+ elif bits == 64:
+ if arch == 'ppc64':
+ return True
+ return False
def isS390():
return os.uname()[4].startswith('s390')
@@ -655,8 +663,10 @@ def getArch():
return 'i386'
elif isX86(bits=64):
return 'x86_64'
- elif isPPC():
+ elif isPPC(bits=32):
return 'ppc'
+ elif isPPC(bits=64):
+ return 'ppc64'
elif isAlpha():
return 'alpha'
elif isSparc():
--
1.6.2.5
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]