python-blivet/0001-initial-PowerNV-class-support.patch

34 lines
947 B
Diff
Raw Normal View History

From fcc941289541a6667445b4c2104b697933b867e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 7 Jun 2019 09:31:01 +0200
Subject: [PATCH] initial PowerNV class support
---
blivet/arch.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/blivet/arch.py b/blivet/arch.py
index 55ce8108..2cd978e9 100644
--- a/blivet/arch.py
+++ b/blivet/arch.py
@@ -72,7 +72,7 @@ def get_ppc_machine():
'Cell': 'pSeries',
'Momentum': 'pSeries',
'PS3': 'PS3',
- 'PowerNV': 'pSeries'
+ 'PowerNV': 'PowerNV'
}
machine = None
platform = None
@@ -330,6 +330,10 @@ def is_ipseries():
return is_ppc() and get_ppc_machine() in ("iSeries", "pSeries")
+def is_powernv():
+ return is_ppc() and get_ppc_machine() == "PowerNV"
+
+
def get_arch():
"""
:return: The hardware architecture