Re: [PATCH 1/2] Store fdata with timestamp and pid in name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]




On 6/5/2012 9:11 AM, Jan Friesse wrote:
> Steven Dake napsal(a):
>> On 06/04/2012 08:49 AM, Jan Friesse wrote:
>>> Steven Dake napsal(a):
>>>> Why not use strftime()?
>>>>
>>>
>>> I didn't know that function. But actually, I don't see any benefit in
>>> using that.
>>>
>>
>> Current implementation looks fragile, whereas libc strftime
>> theoretically would be well maintained by people interested in that sort
>> of functionality.
> 
> I don't agree.
> 

There is actually a portability issue here.

The various time related structures don´t have the same size and/or
precisions across architectures (even within Linux).

strftime does take care of that for you, while you need to handle it
manually otherwise.

We spotted this problem many moons ago when handling qdiskd timestamps
on disk across multi arch clusters.

Fabio
_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss



[Corosync Project]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]

Add to Google Powered by Linux