Re: *oldlenp comes back with wrong value in helper sysctl_createv() function
[email protected] (Michael van Elst)
| Newsgroups | gmane.os.netbsd.devel.kernel |
|---|---|
| Organization | Serpens User Group |
| Message-ID | <[email protected]> |
[email protected] (Emile 'iMil' Heitor) writes: >Except it does not, the first time it calls back the helper function, >*oldlenp value is 1024 no matter what I set it to before. >But if I return once again (either with ENOMEM or 0, doesn't matter), >the helper function will now be called with the right *oldlenp value. The helper function produces the value that is returned in *oldlenp. If you happen to use CTL_DESCRIBE (e.g. running sysctl -d), it's not your helper function being called but the sysctl_describe helper that returns a value of 1024. Maybe you can show your helper routine and how you call sysctl ?