[Nut-upsdev] zero-prepended values - why oh why?
Niklas Edmundsson
nikke at acc.umu.se
Thu Feb 23 15:16:15 UTC 2006
Can somebody please explain why values are 0-prepended in almost every
driver? Since it's done almost everywhere I suspect it's due to some
old policy.
In theory this might have been a good idea given the assumption that
applications are forced to parse the values before presenting them.
However, since this isn't done even within NUT I don't see any real
reason for doing this.
Essentially, 0-prepended values:
* Normally means that they are octal, but they aren't in our case.
* Produces ugly cluttered output when displayed without processing (as
done but upsc/upsstats etc).
* Does not facilitate parsing in any way (it might have if the values
were octal, but they aren't).
I'd really like to remove all 0-prepending of values because of these
reasons. The way to go for this would probably be to agree on some
kind of "best practices" and document it in new-names.txt and then
people can change their drivers in their own pace when they get nagged
by users that their UPS shows ugly 0-prepended stuff in upsstats et
al. ;)
/Nikke
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se | nikke at acc.umu.se
---------------------------------------------------------------------------
I am Groucho of Borg. Say the secret woid and you will be assimilated.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
More information about the Nut-upsdev
mailing list