Re: [PATCH v1 1/5] tools/rtla: Add fatal() and replace error handling pattern
From: Crystal Wood
Date: Fri Oct 10 2025 - 13:52:11 EST
On Fri, 2025-10-10 at 10:20 +0300, Costa Shulyupin wrote:
> On Thu, 9 Oct 2025 at 00:55, Crystal Wood <crwood@xxxxxxxxxx> wrote:
> > Looks like there was existing inconsistency with newlines... maybe have
> > fatal() include the newline automatically to simplify callers slightly?
> > We're not going to print a continuation if we're exiting.
> >
> > Otherwise, for the whole series:
> > Reviewed-by: Crystal Wood <crwood@xxxxxxxxxx>
>
> fatal() belongs to the same family as debug_msg() and err_msg().
> Historically, the prototype and usage of these functions is identical
> to printf().
> printk() was identical as well, but now it adds a missing end-of-line
> automatically.
> fatal(), along with debug_msg() and err_msg(),
> can be upgraded too, but they should be updated together for consistency.
Only fatal() has the "you're never going to get a chance to print a
continuation line so why would you ever not want a newline?" aspect.
And this would be consistent with panic() on the kernel side.
-Crystal