summaryrefslogtreecommitdiffstats
path: root/0001-modules-add-rhelversion-MODULE_INFO-tag.patch
diff options
context:
space:
mode:
Diffstat (limited to '0001-modules-add-rhelversion-MODULE_INFO-tag.patch')
-rw-r--r--0001-modules-add-rhelversion-MODULE_INFO-tag.patch18
1 files changed, 9 insertions, 9 deletions
diff --git a/0001-modules-add-rhelversion-MODULE_INFO-tag.patch b/0001-modules-add-rhelversion-MODULE_INFO-tag.patch
index ac92cce7c..2846acec7 100644
--- a/0001-modules-add-rhelversion-MODULE_INFO-tag.patch
+++ b/0001-modules-add-rhelversion-MODULE_INFO-tag.patch
@@ -1,4 +1,4 @@
-From 363400b236384f01175a85ffc51d7aeccc3423a3 Mon Sep 17 00:00:00 2001
+From 4cb350a80b9a1188f3bb439022c68824b7015b58 Mon Sep 17 00:00:00 2001
From: Laura Abbott <labbott@redhat.com>
Date: Mon, 7 Jan 2019 21:03:10 +0000
Subject: [PATCH] modules: add rhelversion MODULE_INFO tag
@@ -91,20 +91,20 @@ index 1ad393e62bef..3fb19abee033 100644
const char *srcversion;
+ const char *rhelversion;
struct kobject *holders_dir;
-
+
/* Exported symbols */
diff --git a/kernel/module.c b/kernel/module.c
index 646f1e2330d2..aed5b1fcadf8 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -799,6 +799,7 @@ static struct module_attribute modinfo_##field = { \
-
+
MODINFO_ATTR(version);
MODINFO_ATTR(srcversion);
+MODINFO_ATTR(rhelversion);
-
+
static char last_unloaded_module[MODULE_NAME_LEN+1];
-
+
@@ -1263,6 +1264,7 @@ static struct module_attribute *modinfo_attrs[] = {
&module_uevent,
&modinfo_version,
@@ -122,13 +122,13 @@ index 5c3c50c5ec52..188eb460cede 100644
#include "modpost.h"
#include "../../include/linux/license.h"
+#include "../../include/generated/uapi/linux/version.h"
-
+
/* Are we using CONFIG_MODVERSIONS? */
static int modversions = 0;
@@ -2381,6 +2382,12 @@ static void add_srcversion(struct buffer *b, struct module *mod)
}
}
-
+
+static void add_rhelversion(struct buffer *b, struct module *mod)
+{
+ buf_printf(b, "MODULE_INFO(rhelversion, \"%d.%d\");\n", RHEL_MAJOR,
@@ -143,9 +143,9 @@ index 5c3c50c5ec52..188eb460cede 100644
add_moddevtable(&buf, mod);
add_srcversion(&buf, mod);
+ add_rhelversion(&buf, mod);
-
+
sprintf(fname, "%s.mod.c", mod->name);
write_if_changed(&buf, fname);
--
-2.26.0
+2.26.2