Click to See Complete Forum and Search --> : Patches


TheMuso
02-15-2001, 05:30 AM
I am wondering how you apply .diff patches?
I downloaded the supermount patch for kernel 2.4 and do not know how to apply it to the kernel source. Could anybody pease help me shed some light on this?

Thanks.

nopun
02-15-2001, 08:37 AM
From within the "linux" directory that was created when you unpacked your original kernel.

patch -p1 <path_to_patch_file.diff

or if the diff file is still compressed, you can do

gzip -d path_to_patch_file.diff.gz |patch -p1 (substitute bzip as necessary)

The "-p1" tells patch to ignore the everything up to the first / in files described in the diff file.

I would be inclined to keep a pre-patched copy of your source just in case something goes wrong (maybe that's just me being over cautious)

See patch man page for more details.