Date: Mon, 15 Nov 1999 12:44:21 +0200 From: Mark Murray <mark@grondar.za> To: Bruce Evans <bde@zeta.org.au> Cc: Peter Wemm <peter@netplex.com.au>, Garrett Wollman <wollman@khavrinen.lcs.mit.edu>, Kazutaka YOKOTA <yokota@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/syscons scmouse.c src/sys/i386/conf options.i386 src/sys/alpha/conf options.alpha Message-ID: <199911151044.MAA33027@gratis.grondar.za>
next in thread | raw e-mail | index | archive | help
> Similarly for sysctls, except the code is so much nastier that we have a
> special program to support them in userland and special macros to hide
> the details in the kernel.
One program that hadles (or should handle) all sysctls.
> > cases like this, that ends up being horrors like rndcontrol(8). One
> > of the nice things about UNIX is its extremely general-purpose tools,
> > and these one-off ioctl-drivers break that.
>
> What's horrible about it?
>
> $ rndcontrol
> rndcontrol: interrupts in use: 11
> $ rndcontrol -s 14
> rndcontrol: setting irq 14
> rndcontrol: interrupts in use: 11 14
It only does /dev/random ioctls.
> is preferable to:
>
> $ sysctl dev.random.irqs
> 0x2000
> $ sysctl -w $(($((1 << 14)) | $(sysctl -n dev.random.irqs)))
> 0x6000
But this would be even better:
sysctl dev.random.irqs.string (or if you don't like that syntax)
sysctl -s dev.random.irqs (or something; sysctl(1) does need work)
and
sysctl -w dev.random.irqs.${N}=1
sysctl -w dev.random.irqs.${M}=0
> Sysctls are more natural for devices like /dev/random that only have
> one minor, but one of the nice things about unix is that all devices
> are controlled in the same way :-).
/dev/random is going to be driven by Schneier's "Yarrow" algorithm,
and there are lots of tweakables. The ioctl() interface is on the
shortlist for destruction.
M
--
Mark Murray
Join the anti-SPAM movement: http://www.cauce.org
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911151044.MAA33027>
