Messages in this thread | | | Date | Sun, 3 Nov 1996 21:12:23 +0000 (GMT) | From | Peter Denison <> | Subject | Re: X much slower in 2.0.24 than in 1.2.13 |
| |
On Sun, 3 Nov 1996, Linus Torvalds wrote:
[ Tracing problems with X ] > If you haven't reversed a patch before, it's not really hard: > > cp patch-2.0.24 reverse > <your editor> reverse > ... edit out everything but the patch to net/core/sock.c ... > cd /usr/src/linux/net/core > patch -R < xxx/reverse > > The only strange phase is the editing phase: you just want to remove > everything above the line that reads > > diff -u --recursive --new-file v2.0.23/linux/net/core/sock.c linux/net/core/sock.c > > and then you want to remove everything that is after that patch (ie search > for the next line that starts with 'diff -u ..' and remove that and all > following lines). >
Here's a little (tiny, pathetic) utility that I occasionally find useful:
I call it "limitpatch.pl"
It's a perl script (sorry purists!) to run on a huge patch file (a la Linux patches) and pick out just the one you're interested in.
------------------------------8<---------------------------- #!/usr/bin/perl # called with stdin = a patch stream, arg 1 = a filename # outputs only the patch that refers to the filename # peterd@pnd-pc.demon.co.uk
$filename = shift(@ARGV); while (<STDIN>) { $patchon = 0 if m#^---#; $patchon = 1 if m#^\+\+\+.*$filename#; print if $patchon; } ------------------------------8<----------------------------
Example of use for the above problem:
gzip -dc patch-2.0.24.gz | limitpatch net/core/sock.c | patch -p1
Cheers, Peter
-- Peter Denison <peterd@pnd-pc.demon.co.uk> Currently (still) working on a driver for Promise cards under Linux.
| |