From owner-cvs-all Mon Nov 15 2:45:32 1999 Delivered-To: cvs-all@freebsd.org Received: from gratis.grondar.za (gratis.grondar.za [196.7.18.133]) by hub.freebsd.org (Postfix) with ESMTP id 4280515011; Mon, 15 Nov 1999 02:45:19 -0800 (PST) (envelope-from mark@grondar.za) Received: from grondar.za (localhost [127.0.0.1]) by gratis.grondar.za (8.9.3/8.9.3) with ESMTP id MAA33027; Mon, 15 Nov 1999 12:44:22 +0200 (SAST) (envelope-from mark@grondar.za) Message-Id: <199911151044.MAA33027@gratis.grondar.za> To: Bruce Evans Cc: Peter Wemm , Garrett Wollman , Kazutaka YOKOTA , 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 Date: Mon, 15 Nov 1999 12:44:21 +0200 From: Mark Murray Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk > 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