Linux-rt-users Archive on lore.kernel.org
 help / color / Atom feed
* [RTEVAL PATCH] rteval: misc.py: cpuinfo: set default value for 'model name'
@ 2020-10-15  6:50 Anders Roxell
  0 siblings, 0 replies; only message in thread
From: Anders Roxell @ 2020-10-15  6:50 UTC (permalink / raw)
  To: williams, davids; +Cc: linux-rt-users, Anders Roxell

Set a default value to 'unknown CPU' for 'model name'. If 'cat
/proc/cpuinfo' don't provide a 'model name' there will be a default set.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 rteval/misc.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/rteval/misc.py b/rteval/misc.py
index 0dd361ff19fd..d99b3c20ecda 100644
--- a/rteval/misc.py
+++ b/rteval/misc.py
@@ -75,6 +75,8 @@ def cpuinfo():
         if key == 'processor':
             core = val
             info[core] = {}
+            # default model name if there isn't any in /proc/cpuinfo
+            info[core]["model name"] = "unknown CPU"
             continue
         info[core][key] = val
     return info
-- 
2.28.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15  6:50 [RTEVAL PATCH] rteval: misc.py: cpuinfo: set default value for 'model name' Anders Roxell

Linux-rt-users Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rt-users/0 linux-rt-users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rt-users linux-rt-users/ https://lore.kernel.org/linux-rt-users \
		linux-rt-users@vger.kernel.org
	public-inbox-index linux-rt-users

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rt-users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git