1 Star 0 Fork 22

hanhuihui / python-blivet

forked from src-openEuler / python-blivet 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-add-loongarch64-support-for-blivet.patch 886 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhangwenlong01 提交于 2023-02-11 16:32 . add loongarch64 support for blivet
From 26d7d0228dff985138593ef085b5f22bfabee0b7 Mon Sep 17 00:00:00 2001
From: Wenlong Zhang <zhangwenlong@loongson.cn>
Date: Sat, 11 Feb 2023 16:28:21 +0800
Subject: [PATCH] add loongarch64 support for blivet
---
blivet/arch.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/blivet/arch.py b/blivet/arch.py
index 2cd978e..bc76031 100644
--- a/blivet/arch.py
+++ b/blivet/arch.py
@@ -333,6 +333,8 @@ def is_ipseries():
def is_powernv():
return is_ppc() and get_ppc_machine() == "PowerNV"
+def is_loongarch():
+ return os.uname()[4] == 'loongarch64'
def get_arch():
"""
@@ -349,6 +351,8 @@ def get_arch():
elif is_ppc(bits=64):
# ppc64 and ppc64le are distinct architectures
return os.uname()[4]
+ elif is_loongarch():
+ return os.uname()[4]
elif is_aarch64():
return 'aarch64'
elif is_alpha():
--
2.33.0
1
https://gitee.com/han_hui_hui/python-blivet.git
git@gitee.com:han_hui_hui/python-blivet.git
han_hui_hui
python-blivet
python-blivet
master

搜索帮助