On Mon, Aug 17, 2009 at 02:54:52PM -0700, Paul Goyette wrote:
> If names are permitted to include only digits, then there is only one
> mechanism I can think of that would permit the user of sysctl(8) to  
> access both
>
>       foo."3".bar
> and
>       12.3.bam
>
> But the syntax of the first example is rather ugly, and it introduces  
> a(nother) reserved character in the name-space.

sysctl(8) is already able to use mixed numeric/string paths:

> sysctl proc.$$.stopfork
proc.11373.stopfork = 0

To avoid amibiguities, I say that a digits-only name MUST match the
integer name.  That is, this should not be allowed:

sysctl_createv(NULL, 0,
               NULL, &cnode,
               CTLFLAG_PERMANENT, CTLTYPE_NODE, "17", NULL,
               NULL, 0, NULL, 0, 12, 3, CTL_EOL);

because that would create a node with the numeric path 12.3 whose string
path ends in "17".

Dave

-- 
David Young             OJC Technologies
dyo...@ojctech.com      Urbana, IL * (217) 278-3933

Reply via email to