RFC patch: store dive computer serial / firmware again

Dirk Hohndel dirk at hohndel.org
Thu Nov 20 14:23:57 PST 2014


On Fri, Nov 21, 2014 at 12:03:12AM +0200, Lubomir I. Ivanov wrote:
> On 20 November 2014 23:00, Linus Torvalds <torvalds at linux-foundation.org> wrote:
> > Of course, the right solution would be to just do this right in
> > libdivecomputer.c and have libdivecomputer just format the string
> > right in the first place. Using, say, DC_STRING_FIELD.
> 
> can't really comment much on the DC topic itself,
> 
> i think NULL terminated UTF-8 encoded strings is the right thing to do
> when it comes to down to "serial numbers", because they are not
> numbers but codes - in theory with non-iterative parts of any possible
> language and encoding.

Completely agreed. As you saw in Linus' comments and my response - the
issue is that today libdivecomputer gives us a "number". So I tried to at
least capture that, but Linus is completely correct, spewing it out as hex
string is just meaningless garbage.

> i've grown up seeing products with pretty long serial numbers with non
> ASCII characters (wait until the russians get a peace of the DC
> market) and i'm pretty sure some of those will not fit in an uint32_t.

Correct.

/D


More information about the subsurface mailing list