Date: Tue, 08 Oct 2002 17:33:57 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: "Vladimir B. "@FreeBSD.ORG, Grebenschikov@FreeBSD.ORG, " <vova@sw.ru>"@server.baldwin.cx Cc: freebsd-current@freebsd.org, Maxime Henrion <mux@freebsd.org> Subject: Re: DDB sysctl function Message-ID: <XFMail.20021008173357.jhb@FreeBSD.org> In-Reply-To: <1034110999.1146.3.camel@vbook.express.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20021008173357.jhb>