![]() | |||||||||||||
Messages in this thread |
On Sun, Mar 30, 2003 at 09:23:12PM +0200, Pavel Machek wrote: > Hi!> > > > > Floating point values XXX.X or XXX.XX in degrees Celcius.> > > > > > If we're restructuring it, I think we should also agree on _one_ common > > > denominator for all values ie. mVolt and milli-Degree Celsius, so that > > > no userspace program ever again has know how to convert them to > > > user-readable values and every user can just cat the values and doesn't > > > have to wonder if it's centi-Volt, milli-Volt, centi-Degree, dezi-Degree > > > or whatever.> > > > Um, that's what my proposal stated. Do you not agree with it? (You're > > quoting the existing document above, not my proposed changes.)> > Well, you had cV for PSU voltages and> mV for cpu core voltage. I guess mV> and mili-deg-C everywhere would be> nicer. I was trying to keep consistant with what the old /proc values were reported as. I'll go fix that up. As for why no floating point, it's a pain in the but to both output a fixed point number from the kernel into floating point, and to parse a floating point number from userspace within the kernel, turning it into a fixed point number. With the proposal I wrote up, none of that is needed, and all userspace has to do is divide by a factor of 10 to get the proper value. It's much simpler and easier to validate we got it right code. If you're still not convinced take a look at the code in drivers/i2c/i2c-proc.c::i2c_parse_reals() for an example of some hairy code... thanks, greg k-h - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ | ||||||||||||
| Last update: 2005-03-22 12:34 [W:0.979 / U:0.130 seconds] ©2003-2008 Jasper Spaans | |||||||||||||