Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jun 2001 12:49:14 -0700
From:      Jim Pirzyk <Jim.Pirzyk@disney.com>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        freebsd-arch@FreeBSD.ORG
Subject:   Re: sysctl interger type max
Message-ID:  <01060412491406.00744@snoopy>
In-Reply-To: <61282.991683835@critter>
References:  <61282.991683835@critter>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 04 June 2001 12:43 pm, Poul-Henning Kamp wrote:
> In message <01060412361804.00744@snoopy>, Jim Pirzyk writes:
> >On Monday 04 June 2001 12:26 pm, Poul-Henning Kamp wrote:
> >> In message <01060412242703.00744@snoopy>, Jim Pirzyk writes:
> >> >In sysctl(8), you can set an integer type, but the max value
> >> >an int can be is 2 * N-1 where N is the size of int.  This leads
> >> >to a problem when trying to set kern.hostid and the number is
> >> >greater that 2GB on an IA32 system.  So my question is should
> >> >CTLTYPE_INT be treated as a long or some other larger numeric
> >> >number?  Or should we declare some CLTYPE_UINT type?
> >>
> >> We do have an SYSCTL_UINT these days.
> >
> >Yes for establishing the oid in the kernel, but sysctl command
> >line is limited to 2 * 31 bits even if the variable is set to
> >CLTYPE_{UINT|LONG|ULONG}. This means you cannot set the variables
> >to a possible range of values.
>
> Then sysctl(8) is obviously broken...

Yes, so how should it be fixed?  Add another CTLTYPE_* or make
CTLTYPE_INT handle say up to 'long long'?

- JimP

-- 
--- @(#) $Id: dot.signature,v 1.10 2001/05/17 23:38:49 Jim.Pirzyk Exp $
    __o   Jim.Pirzyk@disney.com ------------- pirzyk@freebsd.org
 _'\<,_   Senior Systems Engineer, Walt Disney Feature Animation 
(*)/ (*)  

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01060412491406.00744>