This is a discussion on How to add sysctl variable. within the comp.unix.bsd.openbsd.misc forums, part of the OpenBSD category; --> Hi, how can i add a sysctl variable under kern parent? I modified sysctl.h to include my variable: #define ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, how can i add a sysctl variable under kern parent? I modified sysctl.h to include my variable: #define KERN_MYVAR 71 and change KERN_MAX. I add { "myvar", CTLTYPE_STRING }, \ and i modified kern_sysctl.c with CASE KERN_MYVAR: return(sysctl_int etc. I add int myvar=0 into kern_sysctl.c I use some examples read into c source file, because i have not been able to find some url or doc on Internet where adding of sysctl variable is explained. But when i recompile and reboot, this new variable doesn't exists. Where's mistake? Thanks. |
| ||||
| Newbie wrote: > Hi, how can i add a sysctl variable under kern parent? > I use some examples read into c source file, because i > have not been able to find some url or doc on Internet > where adding of sysctl variable is explained. > > But when i recompile and reboot, this new variable doesn't > exists. Where's mistake? you have to change the userland sysctl program as well unless you have written your own. |