Chinaunix首页 | 论坛 | 博客
  • 博客访问: 693015
  • 博文数量: 182
  • 博客积分: 2088
  • 博客等级: 大尉
  • 技术积分: 1698
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-16 15:09
个人简介

.

文章分类

全部博文(182)

文章存档

2016年(1)

2015年(18)

2014年(14)

2013年(20)

2012年(129)

分类: LINUX

2015-03-17 18:35:42

[git version 1.7.9.5]
1. 准备打patch,出现如下patch failed
git am ../../xxx/patch/*.patch

Applying: Audio: Configure done
Applying: supports play
error: patch failed: drivers/xxx/dev/audio.c:15
error: drivers/xxx/dev/audio.c: patch does not apply
Patch failed at 0003 : supports play
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".

2. 先patch一些可以成功的patch,然后针对错误的文件进行修改
git am ../
patch/20150202/0003-supports-play.patch --reject
Applying: supports play
Checking patch arch/arm/configs/xxx_defconfig...
Hunk #1 succeeded at 2686 (offset -1 lines).
Checking patch drivers/xxx/dev/Kconfig...
Checking patch drivers/xxx/dev/Makefile...
Checking patch drivers/xxx/dev/audio.c...
error: while searching for:
module_param_named(debug, g_debug_mask, int, S_IRUGO | S_IWUSR | S_IWGRP);
......
error: patch failed: drivers/xxx/dev/audio.c:15
Applied patch arch/arm/configs/xxx_defconfig cleanly.
Applied patch drivers/xxx/dev/Kconfig cleanly.
Applied patch drivers/xxx/dev/Makefile cleanly.
Applying patch drivers/xxx/dev/audio.c with 1 rejects...
Rejected hunk #1.
Patch failed at 0001: supports play
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".

3. 修改好后,提交patch,index和commit保持
修改patch失败的文件drivers/xxx/dev/audio.c
#git add .
#git am --resolved

阅读(2584) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~