标签:
For example, I need to apply this patch for my Linux source code: http://git.kernel.org/cgit/linux/kernel/git/davem/net.git/diff/?id=fe82b3300ec9c0dc4ba871f9a58b265aadf4e186
First, I copy this paragraph to a file in local directory: /usr/src/linux-4.3/patch.file.
"
"
and then use this command to do the patch:
# patch < patch.file
and then I got the warning info:
"
can‘t find file to patch at input line 5
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/net/mpls/mpls_iptunnel.c b/net/mpls/mpls_iptunnel.c
|index 67591ae..64afd3d 100644
|--- a/net/mpls/mpls_iptunnel.c
|+++ b/net/mpls/mpls_iptunnel.c
--------------------------
File to patch:
"
I ignore the warning and input the file name: net/mpls/mpls_iptunnel.c
And then the patch is applied.
How to apply a patch for Linux source code
标签:
原文地址:http://www.cnblogs.com/dxh1231/p/5435640.html