Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/freebsd-src.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <dumbbell@FreeBSD.org>2022-11-11 20:36:46 +0300
committerJean-Sébastien Pédron <dumbbell@FreeBSD.org>2022-11-11 20:36:46 +0300
commit0b8a423d073309ab5f24501c2f6b3f6b2cd8f422 (patch)
tree21e68b1a7c13aa6beeca134131b198e38d1a73d0
parentc72dd0aabe25dd4ea82e5b83d36f706d8bd2e783 (diff)
linuxkpi: Introduce module_param() of type `hexint`
In Linux, this affects how the value is formatted. In FreeBSD, this remains an unsigned integer. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D36958
-rw-r--r--sys/compat/linuxkpi/common/include/linux/moduleparam.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/moduleparam.h b/sys/compat/linuxkpi/common/include/linux/moduleparam.h
index d9485de88f56..ebf3b7a95c02 100644
--- a/sys/compat/linuxkpi/common/include/linux/moduleparam.h
+++ b/sys/compat/linuxkpi/common/include/linux/moduleparam.h
@@ -90,6 +90,12 @@
LINUXKPI_PARAM_NAME(name), LINUXKPI_PARAM_PERM(perm), &(var), 0, \
LINUXKPI_PARAM_DESC(name)))
+#define LINUXKPI_PARAM_hexint(name, var, perm) \
+ extern const char LINUXKPI_PARAM_DESC(name)[]; \
+ LINUXKPI_PARAM_PASS(SYSCTL_UINT(LINUXKPI_PARAM_PARENT, OID_AUTO, \
+ LINUXKPI_PARAM_NAME(name), LINUXKPI_PARAM_PERM(perm), &(var), 0, \
+ LINUXKPI_PARAM_DESC(name)))
+
#define LINUXKPI_PARAM_long(name, var, perm) \
extern const char LINUXKPI_PARAM_DESC(name)[]; \
LINUXKPI_PARAM_PASS(SYSCTL_LONG(LINUXKPI_PARAM_PARENT, OID_AUTO, \