Device serial numbers [was: Clean up some of the dive computer nickname code]

Linus Torvalds torvalds at linux-foundation.org
Sat Jan 12 21:38:17 UTC 2013


On Sat, Jan 12, 2013 at 1:15 PM, Jef Driesen <jefdriesen at telenet.be> wrote:
>
> Anyway, we can just fix the decoding of the serial number of course. For the
> fingerprint feature it doesn't have to be decoded correctly, but that does
> mean we can't decode it correctly either (see attached patch). I would
> prefer that instead of adding another callback with a string

I agree. I think there are two independent valid uses for the serial
number: the "identify computer uniquely" one (that the current
interface gives us and is fine at - and as you say, a single number is
easier than a string), and the "try to give users a 'string'
identifier for any paperwork issues (ie warranty registration etc)".

So having a separate callback - and only for dive computers where we
*can* compute that string - would be the right thing, I think. There
is in fact advantages to the existing number that is only a unique
identifier: it may be that for some dive computers you can't give the
"real" serial number (because it may not even be programmatically
available - maybe it's just physically stamped somewhere on the back,
or just in the paperwork that came with the equipment).

So changing the existing interface is likely a bad idea, but giving a
*new* itnerface for the information if it is available would be nice.

              Linus




More information about the Devel mailing list