tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: proposed sysctl(9) changes



On Fri, Aug 21, 2009 at 05:07:43PM -0500, David Young wrote:
> I have been trying to diagnose and fix an obscure bug either in
> sysctl(9) or in the way that I use it....

While you have that code on the operating table, you might make it
easier for drivers (etc) to validate values (particulary numbers)
before they get set.

The current code used to do this is more than horrid!

One possibility is to put the new value into a temporary field
(there is a pad following integer values) and then call the
'helper' function to do the verify and copy.

But that doesn't help for non-numerics.
I'd be loathed to add yet more fields to the sysctl record.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index