dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

Blame SOURCES/mdadm-Fail-for-kernels-older-than-2.6.15.patch

2c1b57
From dcf3d4de95d1a4cbc65b24a844173ba1c1300b55 Mon Sep 17 00:00:00 2001
2c1b57
From: Jes Sorensen <Jes.Sorensen@gmail.com>
2c1b57
Date: Thu, 6 Apr 2017 15:46:31 -0400
2c1b57
Subject: [RHEL7.5 PATCH 067/169] mdadm: Fail for kernels older than 2.6.15
2c1b57
2c1b57
With the removal of old kernel API support, mdadm will no longer run
2c1b57
on kernels older than 2.6.15.
2c1b57
2c1b57
Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
2c1b57
---
2c1b57
 mdadm.c | 5 +++++
2c1b57
 1 file changed, 5 insertions(+)
2c1b57
2c1b57
diff --git a/mdadm.c b/mdadm.c
2c1b57
index 3fe17fc..001ff68 100644
2c1b57
--- a/mdadm.c
2c1b57
+++ b/mdadm.c
2c1b57
@@ -120,6 +120,11 @@ int main(int argc, char *argv[])
2c1b57
 	ident.container = NULL;
2c1b57
 	ident.member = NULL;
2c1b57
 
2c1b57
+	if (get_linux_version() < 2006015) {
2c1b57
+		pr_err("This version of mdadm does not support kernels older than 2.6.15\n");
2c1b57
+		exit(1);
2c1b57
+	}
2c1b57
+
2c1b57
 	while ((option_index = -1),
2c1b57
 	       (opt = getopt_long(argc, argv, shortopt, long_options,
2c1b57
 				  &option_index)) != -1) {
2c1b57
-- 
2c1b57
2.7.4
2c1b57