diff mbox series

[1/2] tst_kvercmp: Add rhel7,8 support

Message ID 20201029163545.9829-1-xuyang_jy_0410@163.com
State Accepted
Headers show
Series [1/2] tst_kvercmp: Add rhel7,8 support | expand

Commit Message

Yang Xu Oct. 29, 2020, 4:35 p.m. UTC
Signed-off-by: Yang Xu <xuyang_jy_0410@163.com>
---
 lib/tst_kvercmp.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Cyril Hrubis Oct. 30, 2020, 12:54 p.m. UTC | #1
Hi!
Both pushed, thanks.
diff mbox series

Patch

diff --git a/lib/tst_kvercmp.c b/lib/tst_kvercmp.c
index 5d56e30b9..8bf65d309 100644
--- a/lib/tst_kvercmp.c
+++ b/lib/tst_kvercmp.c
@@ -146,6 +146,12 @@  const char *tst_kvcmp_distname(const char *kver)
 	if (strstr(kver, ".el6"))
 		return "RHEL6";
 
+	if (strstr(kver, ".el7"))
+		return "RHEL7";
+
+	if (strstr(kver, ".el8"))
+		return "RHEL8";
+
 	if (access(OSRELEASE_PATH, F_OK) != -1) {
 		SAFE_FILE_LINES_SCANF(NULL, OSRELEASE_PATH, "ID=%s", distname);