Hi,

On Fri, Oct 8, 2010 at 9:37 PM, Kees Cook <[email protected]> wrote:
> Hi,
>
> I noticed that the "*" output mode produces a diff like this:
>
> diff -u -p ./security/integrity/ima/ima_fs.c /tmp/nothing
> --- ./security/integrity/ima/ima_fs.c   2010-08-19 20:36:23.431964623 -0700
> +++ /tmp/nothing
>
> which makes using the output with diffstat not so great:
>
>  nothing | 1594 
> ----------------------------------------------------------------
>  1 file changed, 1594 deletions(-)
>
> Would it be possible to just re-use the old filename when generating the
> minus_line/plus_line stuff in cocci.ml ?
>
> Though there was clearly a reason for adding the /tmp/nothing logic there,
> so maybe I'm missing something?

The point is that the "*" produces invalid diff output that should not
be used with
the patch tool. By using /tmp/nothing, we prevent such usage.

Is counting lines beginning with  "-" and not "---" not enough in your case ?


>
> Thanks!
>
> -Kees
>
> --
> Kees Cook
> Ubuntu Security Team
> _______________________________________________
> Cocci mailing list
> [email protected]
> http://lists.diku.dk/mailman/listinfo/cocci
> (Web access from inside DIKUs LAN only)
>



-- 
Nicolas Palix
Tel: +33 6 81 07 91 72
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to