On Thu 06 Mar 2014 18:20:50 enh wrote:
> Decode siginfo_t more clearly for si_code SI_TIMER.
> 
> The 'pid' is actually a POSIX timer id, and the 'uid' is actually the
> overrun.
> 
> Also factor out the si_value dumping so it's the same for every si_code.

please use `git send-email` rather than attaching (and doing base64 encoding 
of) your patches.  it makes it much harder to do reviews when it's like this.

> @@ -561,32 +572,35 @@ printsiginfo(siginfo_t *sip, int verbose)
>               }
>  #ifdef SI_FROMUSER
>               if (SI_FROMUSER(sip)) {
> -                     tprintf(", si_pid=%lu, si_uid=%lu",
> -                             (unsigned long) sip->si_pid,
> -                             (unsigned long) sip->si_uid);
>                       switch (sip->si_code) {
>  #ifdef SI_USER
>                       case SI_USER:
> +                             tprintf(", si_pid=%lu, si_uid=%lu",
> +                                     (unsigned long) sip->si_pid,
> +                                     (unsigned long) sip->si_uid);
>                               break;
>  #endif
>  #ifdef SI_TKILL
>                       case SI_TKILL:
> +                             tprintf(", si_pid=%lu, si_uid=%lu",
> +                                     (unsigned long) sip->si_pid,
> +                                     (unsigned long) sip->si_uid);
>                               break;
>  #endif

well, now the output handling for source signals has been duplicated 3 times.  
that doesn't seem like an improvement.  why not split the logic for decoding 
of the source and decoding of the value so there's no duplication ?

>                       default:
> +                     tprintf(", si_pid=%lu, si_uid=%lu",
> +                             (unsigned long) sip->si_pid,
> +                             (unsigned long) sip->si_uid);

indent here is incorrect
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to