lkml.org 
[lkml]   [2021]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v7 4/5] nvmem: eeprom: at25: export FRAM serial num
From
Date


On 08. 06. 21 11:03, Greg Kroah-Hartman wrote:
> On Mon, Jun 07, 2021 at 04:47:44PM +0200, Jiří Prchal wrote:
>>
>>
>> On 07. 06. 21 14:36, Greg Kroah-Hartman wrote:
>>> On Mon, Jun 07, 2021 at 02:26:39PM +0200, Jiri Prchal wrote:
>>>> + return sysfs_emit(buf, "%016llx\n", *(unsigned long long *)at25->sernum);
>>>
>>> That's a horrid hack, why not use the %*phN modifier?
>>
>> Prints as little endian, is that OK?
>
> You tell me! What tool is going to be reading this? What do they
> expect it to look like?

sh, php in my usecase as unique id.
So endianess does not matter to me too much. The question is what is
usual (like mac address, uuid...?).

> And it's a byte array, why would there be endian issues?

Now is printed as one big number. Not real issue. Just human
readability? Should I turn back it to space separated bytes?

J

\
 
 \ /
  Last update: 2021-06-08 11:48    [W:0.250 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site