"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Dag-Erling Smørgrav <des@FreeBSD.org>
Subject:
Re: diff -p redux
To:
gameoftrees@openbsd.org
Cc:
thj@freebsd.org
Date:
Fri, 08 Mar 2024 10:25:21 +0100

Download raw body.

Thread
Stefan Sperling <stsp@stsp.name> writes:
> With your patch applied, diff -p shows context lines in hunk headers,
> for both cases discussed in the thread linked above (btrace.c and Makefile).

Yes, that's the whole point.

> This is the reason the original change made by Tom was backed out.

It was backed out because it sometimes picked up lines from _after_ the
change:

    --- btrace.c
    +++ btrace.c
    @@ -117,6 +117,7 @@ uint64_t             bt_filtered;   /* # of events filtered out */
     struct dtioc_arg_info  **dt_args;      /* array of probe arguments */
    
     struct dt_evt           bt_devt;       /* fake event for BEGIN/END */
    +#define FOO    0
     uint64_t                bt_filtered;   /* # of events filtered out */
    
     struct syms            *kelf, *uelf;

My patch doesn't do that.

DES
-- 
Dag-Erling Smørgrav - des@FreeBSD.org