Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148160018
D1042.id5607.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D1042.id5607.diff
View Options
Index: head/sys/compat/linux/linux_mib.h
===================================================================
--- head/sys/compat/linux/linux_mib.h
+++ head/sys/compat/linux/linux_mib.h
@@ -42,8 +42,19 @@
int linux_kernver(struct thread *td);
-#define LINUX_KERNVER_2004000 2004000
-#define LINUX_KERNVER_2006000 2006000
+#define LINUX_KVERSION 2
+#define LINUX_KPATCHLEVEL 6
+#define LINUX_KSUBLEVEL 18
+
+#define LINUX_KERNVER(a,b,c) (((a) << 16) + ((b) << 8) + (c))
+#define LINUX_VERSION_CODE LINUX_KERNVER(LINUX_KVERSION, \
+ LINUX_KPATCHLEVEL, LINUX_KSUBLEVEL)
+#define LINUX_KERNVERSTR(x) #x
+#define LINUX_XKERNVERSTR(x) LINUX_KERNVERSTR(x)
+#define LINUX_VERSION_STR LINUX_XKERNVERSTR(LINUX_KVERSION.LINUX_KPATCHLEVEL.LINUX_KSUBLEVEL)
+
+#define LINUX_KERNVER_2004000 LINUX_KERNVER(2,4,0)
+#define LINUX_KERNVER_2006000 LINUX_KERNVER(2,6,0)
#define linux_use26(t) (linux_kernver(t) >= LINUX_KERNVER_2006000)
Index: head/sys/compat/linux/linux_mib.c
===================================================================
--- head/sys/compat/linux/linux_mib.c
+++ head/sys/compat/linux/linux_mib.c
@@ -129,9 +129,9 @@
static struct linux_prison lprison0 = {
.pr_osname = "Linux",
- .pr_osrelease = "2.6.18",
+ .pr_osrelease = LINUX_VERSION_STR,
.pr_oss_version = 0x030600,
- .pr_osrel = 2006018
+ .pr_osrel = LINUX_VERSION_CODE
};
static unsigned linux_osd_jail_slot;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 17, 4:21 AM (7 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29752840
Default Alt Text
D1042.id5607.diff (1 KB)
Attached To
Mode
D1042: Introduce LINUX_VERSION_STR, LINUX_VERSION_CODE macro for use instead of harcoded pr_osrelease, pr_osrel values. This will be used later in the VDSO.
Attached
Detach File
Event Timeline
Log In to Comment