On Fri, 8 Oct 2010, Nicolas Palix wrote:
> 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.
I guess. Mostly it's just because it never occurred to me to use
diffstat, so I didn't see the problem :)
Perhaps something like /tmp/nothing/realfilename would be a good
compromise?
julia
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)