NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

sysctl creation



According to sysctl(9):

     int
     sysctl_createv(struct sysctllog **log, int cflags,
         const struct sysctlnode **rnode, const struct sysctlnode **cnode,
         int flags, int type, const char *namep, const char *desc,
         sysctlfn func, u_quad_t qv, void *newp, size_t newlen, ...);

     One of func, qv and the CTLFLAG_IMMEDIATE
     flag, or newp and newlen must be given for nodes that instrument data,
     otherwise an error is returned.

AFAICT func is called whenever I read/write the sysctl after
creation, but how can I set the original sysctl value if it is
an error to set qv as well? (What is the Right Way?)

Cheers,

Patrick


Home | Main Index | Thread Index | Old Index