Date: Thu, 26 May 2016 08:44:11 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300719 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <201605260844.u4Q8iBNY047061@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Thu May 26 08:44:11 2016 New Revision: 300719 URL: https://svnweb.freebsd.org/changeset/base/300719 Log: Add support for boolean module parameters in the LinuxKPI. Requested by: kmacy @ Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/moduleparam.h Modified: head/sys/compat/linuxkpi/common/include/linux/moduleparam.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/moduleparam.h Thu May 26 08:41:55 2016 (r300718) +++ head/sys/compat/linuxkpi/common/include/linux/moduleparam.h Thu May 26 08:44:11 2016 (r300719) @@ -50,6 +50,12 @@ #define LINUXKPI_PARAM_DESC(name) LINUXKPI_PARAM_CONCAT(linuxkpi_,LINUXKPI_PARAM_PREFIX,name,_desc) #define LINUXKPI_PARAM_NAME(name) LINUXKPI_PARAM_CONCAT(LINUXKPI_PARAM_PREFIX,name,,) +#define LINUXKPI_PARAM_bool(name, var) \ + extern const char LINUXKPI_PARAM_DESC(name)[]; \ + LINUXKPI_PARAM_PASS(SYSCTL_BOOL(LINUXKPI_PARAM_PARENT, OID_AUTO,\ + LINUXKPI_PARAM_NAME(name), CTLFLAG_RDTUN, &(var), 0, \ + LINUXKPI_PARAM_DESC(name))) + #define LINUXKPI_PARAM_byte(name, var) \ extern const char LINUXKPI_PARAM_DESC(name)[]; \ LINUXKPI_PARAM_PASS(SYSCTL_U8(LINUXKPI_PARAM_PARENT, OID_AUTO, \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605260844.u4Q8iBNY047061>