python-blivet/1001-add-sw_64-support-not-upstream-modified-files.patch
panchenbo d9e348de5b turn on sw_64 loongarch for all arch reorder patchs
(cherry picked from commit 2267283183eaf907193274777a2037c61a039af0)
2023-09-25 14:12:41 +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():