python-blivet/blivet-3.4.2-sw.patch
wzx d1aaed08e6 Add sw64 architecture
Signed-off-by: wzx <wuzx1226@qq.com>
2022-11-03 19:50:16 +08:00

29 lines
760 B
Diff
Executable File

diff -Naur blivet-3.4.2.org/blivet/arch.py blivet-3.4.2.sw/blivet/arch.py
--- blivet-3.4.2.org/blivet/arch.py 2022-09-05 16:07:41.840000000 +0000
+++ blivet-3.4.2.sw/blivet/arch.py 2022-09-05 16:09:17.720000000 +0000
@@ -304,6 +304,15 @@
return os.uname()[4] == 'ia64'
+def is_sw_64():
+ """
+ :return: True if the hardware supports Sw_64, False otherwise.
+ :rtype: boolean
+
+ """
+ return os.uname()[4].startswith('sw_64')
+
+
def is_alpha():
"""
:return: True if the hardware supports Alpha, False otherwise.
@@ -351,6 +360,8 @@
return os.uname()[4]
elif is_aarch64():
return 'aarch64'
+ elif is_sw_64():
+ return 'sw_64'
elif is_alpha():
return 'alpha'
elif is_arm():