The documentation for the sysctl function says the following:

This is a new value. If it is a new value, newp should be set to NULL and newlen set to 0.

But I can not understand what this means.

    1 answer 1

    Literal translation:

    To set a new value, newp points to a buffer of length newlen , from which the requested value is taken. If the new value is not set, then newp must be set to NULL , and newlen to 0.

    • I do not need a literal, but a semantic one - van9petryk
    • 2
      @ van9petryk and what is not clear in the verbatim? Function for setting and reading data. It is necessary to read - oldp / oldlenp is used, to write - newp / newlen . - 伪位蔚蠂慰位蠀蟿
    • I forgot that the function is also used for installation. Therefore, there were all sorts of guesses about new, newlen. - van9petryk
    • one
      @ van9petryk read the documentation carefully: get or set system information . - 伪位蔚蠂慰位蠀蟿