[expert] probally a daft question BUT
Hi all re:patching a diff file to the kernel I tried to patch and got this [root@fw-gb7tf linux-2.4.17-20mdk]# patch -n kernel-2.4.17-20mdk netrom-2.4.17-20mdk.diff patch: Only garbage was found in the patch input. The first lines of the patch is diff -ruN -X dontdiff linux-2.4.17-20mdk/net/netrom/af_netrom.c linux/net/netrom/af_netrom.c --- linux-2.4.17-20mdk/net/netrom/af_netrom.c Tue Feb 19 16:06:42 2002 +++ linux/net/netrom/af_netrom.cTue Feb 19 16:14:39 2002 @@ -31,7 +31,9 @@ * NET/ROM 007 Jonathan(G4KLX) New timer architecture. * Impmented Idle timer. * Arnaldo C. Melo s/suser/capable/, micro cleanups - * Jeroen (PE1RXQ) Use sock_orphan() on release. + * Jeroen(PE1RXQ) Use sock_orphan() on release. + * Tomi(OH2BNS)Better frame type checking. + * Device refcnt fixes. */ Am I right to use -n for the patch option ? and to apply the patch to the source code within the /usr/src/linux-2.4.17-20 directory ? TIA -- Best regards Richard Bown Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] probally a daft question BUT
On Sat, 23 Feb 2002 00:22, richard wrote: > Hi all > > > re:patching a diff file to the kernel > > I tried to patch and got this > [root@fw-gb7tf linux-2.4.17-20mdk]# patch -n kernel-2.4.17-20mdk That's not how you patch something! You cd into the appropriate directory where your unpatched source is and then type "patch -p0 < netrom-2.4.17-20mdk.diff.patch". Read up the manpage on patch with regards to -p0 because it's confusing (to me, anyway) and in this case, it's -p1. Forget the -n (patch can figure it out by itself) and plus it's -u in this case since you have a unified patch, anyway. > netrom-2.4.17-20mdk.diff patch: Only garbage was found in the patch > input. > > The first lines of the patch is > > diff -ruN -X dontdiff linux-2.4.17-20mdk/net/netrom/af_netrom.c > linux/net/netrom/af_netrom.c > --- linux-2.4.17-20mdk/net/netrom/af_netrom.c Tue Feb 19 16:06:42 2002 > +++ linux/net/netrom/af_netrom.cTue Feb 19 16:14:39 2002 > @@ -31,7 +31,9 @@ > * NET/ROM 007 Jonathan(G4KLX) New timer architecture. > * Impmented Idle timer. > * Arnaldo C. Melo s/suser/capable/, micro cleanups > - * Jeroen (PE1RXQ) Use sock_orphan() on release. > + * Jeroen(PE1RXQ) Use sock_orphan() on release. > + * Tomi(OH2BNS)Better frame type checking. > + * Device refcnt fixes. > */ > > Am I right to use -n for the patch option ? > No, no, -u in this case (see the diff -u :). And just leave it out anyway. > and to apply the patch to the source code within the > /usr/src/linux-2.4.17-20 directory ? > cd /usr/src/linux-2.4.17-20 patch -p1 < netrom-2.4.17-20mdk.diff.patch. pesarif Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] probally a daft question BUT
On Sun, 24 Feb 2002 00:03:47 +1100 pesarif <[EMAIL PROTECTED]> studiouisly spake these words to ponder: > On Sat, 23 Feb 2002 00:22, richard wrote: > > Hi all > > > > > > re:patching a diff file to the kernel > > > > I tried to patch and got this > > [root@fw-gb7tf linux-2.4.17-20mdk]# patch -n kernel-2.4.17-20mdk > That's not how you patch something! > You cd into the appropriate directory where your unpatched source is and > then type "patch -p0 < netrom-2.4.17-20mdk.diff.patch". Read up the > manpage on patch with regards to -p0 because it's confusing (to me, > anyway) and in this case, it's -p1. Forget the -n (patch can figure it > out by itself) and plus it's -u in this case since you have a unified > patch, anyway. > > > netrom-2.4.17-20mdk.diff patch: Only garbage was found in the patch > > input. > > > > The first lines of the patch is > > > > diff -ruN -X dontdiff linux-2.4.17-20mdk/net/netrom/af_netrom.c > > linux/net/netrom/af_netrom.c > > --- linux-2.4.17-20mdk/net/netrom/af_netrom.c Tue Feb 19 16:06:42 2002 > > +++ linux/net/netrom/af_netrom.cTue Feb 19 16:14:39 2002 > > @@ -31,7 +31,9 @@ > > * NET/ROM 007 Jonathan(G4KLX) New timer architecture. > > * Impmented Idle timer. > > * Arnaldo C. Melo s/suser/capable/, micro cleanups > > - * Jeroen (PE1RXQ) Use sock_orphan() on release. > > + * Jeroen(PE1RXQ) Use sock_orphan() on release. > > + * Tomi(OH2BNS)Better frame type checking. > > + * Device refcnt fixes. > > */ > > > > Am I right to use -n for the patch option ? > > > No, no, -u in this case (see the diff -u :). And just leave it out > anyway. > > > and to apply the patch to the source code within the > > /usr/src/linux-2.4.17-20 directory ? > > > cd /usr/src/linux-2.4.17-20 > patch -p1 < netrom-2.4.17-20mdk.diff.patch. > > pesarif > > well I'll be dipped! so _thats_ how patch works!! I've been wondering about that for the longest time but just never got around to figuring it out. That's awesome! -- daRcmaTTeR - Registered Linux User 182496 - 9:05am up 3 days, 1:41, 3 users, load average: 0.53, 0.64, 0.56 Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] probally a daft question BUT
> well I'll be dipped! so _thats_ how patch works!! I've been wondering about > that for the longest time but just never got around to figuring it out. > That's awesome! Yeah at first it got me as well - but it's important to be in the right place and understand the diff (pun) between -p0 and -p1 etc. FWIW I had a dream last night in that I was watching a windows system do a patch - it would exec a few lines, stop, have the HD shudder, sit for a while, exec a few more lines, etc. :) One of my early experiences in Linux was just being awestruck when doing a patch (and that was on a reaal old system by today's standards) and having the lines just fly so fast on the screen you couldn't see what was going on. I mean, this thing has to do _some_ file manipulation, right? :) Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] probally a daft question BUT
On Sat, 23 Feb 2002 14:13:41 -0800 (PST) [EMAIL PROTECTED] (dfox) studiouisly spake these words to ponder: > > well I'll be dipped! so _thats_ how patch works!! I've been wondering > > about that for the longest time but just never got around to figuring it > > out. That's awesome! > > Yeah at first it got me as well - but it's important to be in the right > place and understand the diff (pun) between -p0 and -p1 etc. > > FWIW I had a dream last night in that I was watching a windows system > do a patch - it would exec a few lines, stop, have the HD shudder, > sit for a while, exec a few more lines, etc. :) > > One of my early experiences in Linux was just being awestruck when > doing a patch (and that was on a reaal old system by today's > standards) and having the lines just fly so fast on the screen you > couldn't see what was going on. I mean, this thing has to do _some_ file > manipulation, right? :) > > And who said penguins can't fly! -- daRcmaTTeR - Registered Linux User 182496 - 9:05am up 4 days, 1:41, 2 users, load average: 0.05, 0.15, 0.22 Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com