Re: DDB sysctl function

2002-10-09 Thread Vladimir B.
÷ Wed, 09.10.2002, × 10:17, Bruce Evans ÎÁÐÉÓÁÌ: On Tue, 8 Oct 2002, John Baldwin wrote: On 08-Oct-2002 Vladimir B. Grebenschikov wrote: ÷ Tue, 08.10.2002, × 22:25, Maxime Henrion ÎÁÐÉÓÁÌ: - I'm not sure if using the context of the init process to do sysctl calls is the right way

Re: DDB sysctl function

2002-10-09 Thread Vladimir B.
÷ Wed, 09.10.2002, × 01:03, Vladimir B. Grebenschikov ÎÁÐÉÓÁÌ: ÷ 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

Re: DDB sysctl function

2002-10-09 Thread Maxime Henrion
Vladimir B. Grebenschikov wrote: ? Wed, 09.10.2002, ? 01:03, Vladimir B. Grebenschikov ???: ? Tue, 08.10.2002, ? 22:25, Maxime Henrion ???: Vladimir B. Grebenschikov wrote: Hi Attached diff introduces new ddb interface - access to sysctl interface [...]

Re: DDB sysctl function

2002-10-09 Thread Maxime Henrion
Maxime Henrion wrote: [...] - 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

Re: DDB sysctl function

2002-10-09 Thread Bruce Evans
On Wed, 9 Oct 2002, Maxime Henrion wrote: What I meant in my previous mail is that you could malloc() these objects instead of putting them on the stack. Also, you don't need buffers that big since the size you need is bounded at max(sizeof(int), TOK_STRING_SIZE), which is likely to be

Re: DDB sysctl function

2002-10-09 Thread Maxime Henrion
Bruce Evans wrote: On Wed, 9 Oct 2002, Maxime Henrion wrote: What I meant in my previous mail is that you could malloc() these objects instead of putting them on the stack. Also, you don't need buffers that big since the size you need is bounded at max(sizeof(int), TOK_STRING_SIZE),

Re: DDB sysctl function

2002-10-09 Thread Bruce Evans
On Wed, 9 Oct 2002, Maxime Henrion wrote: Bruce Evans wrote: On Wed, 9 Oct 2002, Maxime Henrion wrote: What I meant in my previous mail is that you could malloc() these objects instead of putting them on the stack. Also, you don't need buffers that big since the size you need is

Re: DDB sysctl function

2002-10-09 Thread Vladimir B.
÷ Wed, 09.10.2002, × 16:23, Maxime Henrion ÎÁÐÉÓÁÌ: Bruce Evans wrote: On Wed, 9 Oct 2002, Maxime Henrion wrote: What I meant in my previous mail is that you could malloc() these objects instead of putting them on the stack. Also, you don't need buffers that big since the size

DDB sysctl function

2002-10-08 Thread Vladimir B.
Hi Attached diff introduces new ddb interface - access to sysctl interface sysctl - read sysctl value sysctlw - write sysctl value Example: Translate string to sysctl MIB: db sysctlw 0.3 hw\.model 0xcd1aaeec: 6 2 db Now get string by this MIB: db sysctl 6.2 s 0xcd1ab24: Pentium

Re: DDB sysctl function

2002-10-08 Thread 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. - There is a TOK_STRING_SIZE macro which defines the size of the the db_tok_string

Re: DDB sysctl function

2002-10-08 Thread Julian Elischer
VERY COOL! On 8 Oct 2002, Vladimir B. Grebenschikov wrote: Hi Attached diff introduces new ddb interface - access to sysctl interface sysctl - read sysctl value sysctlw - write sysctl value Example: Translate string to sysctl MIB: db sysctlw 0.3 hw\.model 0xcd1aaeec:

Re: DDB sysctl function

2002-10-08 Thread Vladimir B.
÷ 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

Re: DDB sysctl function

2002-10-08 Thread Bruce Evans
On Tue, 8 Oct 2002, John Baldwin wrote: On 08-Oct-2002 Vladimir B. Grebenschikov wrote: ÷ Tue, 08.10.2002, × 22:25, Maxime Henrion ÎÁÐÉÓÁÌ: - 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