Question regarding patches

Jeff Kirsher tarbal at gmail.com
Wed Dec 19 04:26:16 EST 2012


On 12/19/2012 12:47 AM, Shraddha Kamat wrote:
> Sorry if this is not relevant to kernel. But since I am 
> patching the kernel - Please consider this as a uber beginner
> question to ask on this mailing list - forgive me for that.
>
> Now my question is - 
>
> What "@@ -321,7 +321,8 @@" mean in this snippet from the patch -  

The first number -321 means the line number of the original file that
the change takes place.  The next number & means that before the change,
there were 7 lines of code.  The next number +321 is the line number
after the change.  Since this is the first (and only change) it is the
same as the first number.  If there multiple changes in a patch, this
number can differ greatly from the first number.  The last number is the
lines of code after the change.
>
> diff --git a/exec.h b/exec.h
> index 722c620..6abb687 100644
> --- a/exec.h
> +++ b/exec.h
> @@ -321,7 +321,8 @@ static void acct_arg_size(struct linux_binprm *bprm,
> unsigned long pages);
>
> -- Shraddha 
>
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20121219/cb9f2f39/attachment.bin 


More information about the Kernelnewbies mailing list