On Thu, May 15, 2025 at 12:04 AM Christian Brauner <brauner@xxxxxxxxxx> wrote: > We're going to extend the coredump code in follow-up patches. > Clean it up so we can do this more easily. typo nit: format_corename() written wrong in patch title > Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx> Reviewed-by: Jann Horn <jannh@xxxxxxxxxx> > @@ -384,12 +393,12 @@ static int format_corename(struct core_name *cn, struct coredump_params *cprm, > * If core_pattern does not include a %p (as is the default) > * and core_uses_pid is set, then .%pid will be appended to > * the filename. Do not do this for piped commands. */ > - if (!ispipe && !pid_in_pattern && core_uses_pid) { > + if (!(cn->core_type == COREDUMP_PIPE) && !pid_in_pattern && core_uses_pid) { non-actionable note: "!(cn->core_type == COREDUMP_PIPE)" can be simplified to "cn->core_type != COREDUMP_PIPE"; but patch 4 rewrites this anyway, so no need to change this