Re: [PATCH 1/4] printk: LOG_CONT and LOG_NEWLINE are separate

From: Alex Elder
Date: Thu Jul 17 2014 - 08:31:14 EST


On 07/17/2014 03:39 AM, Petr Mládek wrote:
> On Wed 2014-07-16 12:26:57, Alex Elder wrote:
>> Two log record flags--LOG_CONT and LOG_NEWLINE--are never both set
>> at the same time in a log record flags field. What follows is a
>> great deal of explanation that aims to prove this assertion.
>
> It makes perfect sense. If you found a situation where both flags were
> set together, it would mean a bug. If a record ends with new line, it
> is not continuous and vice versa.

. . .

My earlier response basically argued for keeping the patch
as I originally proposed it.

That is still my plan. However there is one more thing
that I have verified since posting it--I can make the
stronger assertion that LOG_CONT and LOG_NEWLINE are
mutually exclusive. That is, not only will they never
be both set at the time, but one of them will always
be set.

Rather than add that as a new patch I'm going to rework
the explanation, and make one more small code change
to make this a little easier to see.

-Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/