[CRIU] Re: [PATCH 2/2] log: Reset @buf_off on LOG_MSG

Pavel Emelyanov xemul at parallels.com
Thu Nov 1 07:51:20 EDT 2012


On 11/01/2012 03:42 PM, Cyrill Gorcunov wrote:
> On Thu, Nov 01, 2012 at 03:29:23PM +0400, Pavel Emelyanov wrote:
>> On 10/31/2012 06:24 PM, Cyrill Gorcunov wrote:
>>>
>>> Otherwise if there were some error message earlier
>>> the buf_off set to TS_BUF_OFF and all further pr_msg
>>> do produce time stamp (which they are should not).
>>>
>>> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
>>
>> buf_off should be set up on log init, not on every message print.
> 
> You miss the point. If we print pr_msg after pr_err, the ts area
> erroniously consists of previous timestamp. Just try out "crtools show-f
> something".

OK, then fix it. But don't _override_ the global variable in printing fn.


More information about the CRIU mailing list