Page MenuHomeFreeBSD

D15952.id44256.diff
No OneTemporary

D15952.id44256.diff

Index: sys/amd64/linux/linux_sysvec.c
===================================================================
--- sys/amd64/linux/linux_sysvec.c
+++ sys/amd64/linux/linux_sysvec.c
@@ -799,10 +799,11 @@
return (false);
/*
- * For Linux we encode osrel as follows (see linux_mib.c):
- * VVVMMMIII (version, major, minor), see linux_mib.c.
+ * For Linux we encode osrel using the Linux convention of
+ * (version << 16) | (major << 8) | (minor)
+ * See macro in linux_mib.h
*/
- *osrel = desc[1] * 1000000 + desc[2] * 1000 + desc[3];
+ *osrel = LINUX_KERNVER(desc[1], desc[2], desc[3]);
return (true);
}
Index: sys/compat/linux/linux_mib.c
===================================================================
--- sys/compat/linux/linux_mib.c
+++ sys/compat/linux/linux_mib.c
@@ -149,8 +149,8 @@
if (osrelease == sep || sep != eosrelease)
return (EINVAL);
- v = v0 * 1000000 + v1 * 1000 + v2;
- if (v < 1000000)
+ v = LINUX_KERNVER(v0, v1, v2);
+ if (v < 0x010000)
return (EINVAL);
if (osrel != NULL)
Index: sys/i386/linux/linux_sysvec.c
===================================================================
--- sys/i386/linux/linux_sysvec.c
+++ sys/i386/linux/linux_sysvec.c
@@ -970,10 +970,11 @@
return (false);
/*
- * For Linux we encode osrel as follows (see linux_mib.c):
- * VVVMMMIII (version, major, minor), see linux_mib.c.
+ * For Linux we encode osrel using the Linux convention of
+ * (version << 16) | (major << 8) | (minor)
+ * See macro in linux_mib.h
*/
- *osrel = desc[1] * 1000000 + desc[2] * 1000 + desc[3];
+ *osrel = LINUX_KERNVER(desc[1], desc[2], desc[3]);
return (true);
}

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 2, 8:00 AM (3 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30714945
Default Alt Text
D15952.id44256.diff (1 KB)

Event Timeline