[PATCH 1/2] rteval: osinfo.py: Fix RT kernel detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Punit Agrawal <punit1.agrawal@xxxxxxxxxxxxx>

Since the osinfo.py module was developed, RT kernels have moved on
from identifying as "RT" to "PREEMPT_RT". This change in the kernel
identifier causes osinfo.py to incorrectly detect RT kernels as
non-RT.

Update the check for detecting RT kernel to be able to handle both the
variants.

Signed-off-by: Punit Agrawal <punit1.agrawal@xxxxxxxxxxxxx>
---
 rteval/sysinfo/osinfo.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rteval/sysinfo/osinfo.py b/rteval/sysinfo/osinfo.py
index 98e5b4422cad..7b7bfe9ce4ec 100644
--- a/rteval/sysinfo/osinfo.py
+++ b/rteval/sysinfo/osinfo.py
@@ -91,7 +91,7 @@ class OSInfo:
 
         (sys, node, release, ver, machine) = os.uname()
         isrt = 1
-        if ver.find(' RT ') == -1:
+        if 'RT ' not in ver:
             isrt = 0
 
         node_n = libxml2.newNode("node")
-- 
2.32.0




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux