[PATCH v4 2/7] Use printpid in decoders

Ákos Uzonyi uzonyi.akos at gmail.com
Fri Jul 31 09:42:14 UTC 2020


On Thu, 30 Jul 2020 at 22:42, Dmitry V. Levin <ldv at altlinux.org> wrote:
> On Mon, Jul 27, 2020 at 08:54:05PM +0200, Ákos Uzonyi wrote:
> [...]
> > @@ -59,8 +59,23 @@ print_f_owner_ex(struct tcb *const tcp, const kernel_ulong_t addr)
> >               return;
> >
> >       PRINT_FIELD_XVAL("{", owner, type, f_owner_types, "F_OWNER_???");
> > -     PRINT_FIELD_D(", ", owner, pid);
> > -     tprints("}");
> > +
> > +     enum pid_type pid_type = PT_NONE;
> > +     switch (owner.type)
> > +     {
> > +     case F_OWNER_TID:
> > +             pid_type = PT_TID;
> > +             break;
> > +     case F_OWNER_PID:
> > +             pid_type = PT_TGID;
> > +             break;
> > +     case F_OWNER_PGRP:
> > +             pid_type = PT_PGID;
> > +             break;
> > +     }
> > +     tprintf(", pid=");
> > +     printpid(tcp, owner.pid, pid_type);
> > +     tprintf("}");
> >  }
>
> Please make sure your changes do not replace tprints with tprintf
> for printing strings without format specifiers.
>
> I sometimes forget to check this, so I have to commit cleanups like
> 55d126a8d7dfedf51a862c377db36ce674b478d1 and
> c5108cc878bfb65014c996be0eba0f9847bcb407 from time to time.

Okay, I will replace tprintf with tprintf where possible.

Just a quick question: do you have a script to automatically generate
the changelog entries for a commit message?


More information about the Strace-devel mailing list