21

Assuming the CONFIG value isn't tiny, IDEAL_CMDLINE_LEN is the CONFIG
value minus 21.

So let's assume COMMAND_LINE_SIZE is 256. That means we can have at
most a cmdline length 255 to handle the '\0' termination.

So if the CONFIG value is (255 + 21) = 276 or more then we should hit
the "if" test and early-out because we can't wrap. If the CONFIG value
is 275 or less then we should proceed to wrapping.

We want ((276 - 21) >= (256 - 1)) to be true. It is.

We want ((275 - 21) >= (256 - 1)) to be false. It is.


I'll wait a few days and send a v4. I'll fold in Andrew's "__init"
patch as well.


[1] http://lore.kernel.org/r/CAD=FV=WFbH6kBMcoHNwQzsay6ecQQ2sZ3qc-=XTboFXK+RSspA@mail.gmail.com


-Doug[PATCH v3] init/main.c: Wrap long kernel cmdline when printing to logsDoug Anderson <dianders@chromium.org> undefinedGeert Uytterhoeven <geert@linux-m68k.org> undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined—LƒÄE
