# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # test_int_sysctl.c # Makefile # echo x - test_int_sysctl.c sed 's/^X//' >test_int_sysctl.c << '77aefbd69fbbe98c6a0bcaf0991107f7' X#include X#include X#include X#include X#include X#include X X#define MODULE_NAME "test_int_sysctl" X Xstatic int _sysctl; X XSYSCTL_INT(_debug, OID_AUTO, test_int_sysctl, CTLFLAG_RW, &_sysctl, 0, X "Test sysctl OID"); X Xstatic int Xload (module_t m, int what, void *arg) X{ X switch (what) { X case MOD_LOAD: X printf("%s: %d\n", MODULE_NAME, _sysctl); X break; X } X return (0); X} X Xstatic moduledata_t test_int_sysctl_mod = { X MODULE_NAME, X load, X}; XDECLARE_MODULE(test_int_sysctl, test_int_sysctl_mod, SI_SUB_KLD, X SI_ORDER_ANY); XMODULE_VERSION(test_int_sysctl, 1); 77aefbd69fbbe98c6a0bcaf0991107f7 echo x - Makefile sed 's/^X//' >Makefile << 'b67911656ef5d18c4ae36cb6741b7965' XKMOD= test_int_sysctl XSRCS= test_int_sysctl.c X X.include b67911656ef5d18c4ae36cb6741b7965 exit