On 08-Oct-2002 Vladimir B. " Grebenschikov wrote: > χ Tue, 08.10.2002, Χ 22:25, Maxime Henrion ΞΑΠΙΣΑΜ: >> Vladimir B. Grebenschikov wrote: >> > Hi >> > >> > Attached diff introduces new ddb interface - access to sysctl interface >> [...] >> >> Looks like this would be very useful. I have a few comments, mainly >> about style though. > > Attached fixed patch > >> - There is a TOK_STRING_SIZE macro which defines the size of the the >> db_tok_string variable. Use it instead of declaring several 1k >> variables on the stack. > > It is not token buffers - it is buffers for sysctl data interchange, > const 1024 changed to SYSCTL_DATA_BUFSIZE define. > >> - I'm not sure if using the context of the init process to do sysctl >> calls is the right way to go. However, it is not very clear what you >> should use to do this, at least to me. > > kernel_sysctl need thread pointer, it may be used in sysctl handlers.
Use curthread perhaps. In -current you always have a thread context, even when idle. -- John Baldwin <[EMAIL PROTECTED]> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message