2006-05-03 12:00:30

by Yogesh Pahilwan

[permalink] [raw]
Subject: Problem while applying patch to 2.6.9 kernel

Hi Kernel Folks,

I am facing some problem while applying patch to the 2.6.9 kernel.

I have done following to apply the patch:

# patch -p1 < ../../Patches/patch-ext3

But getting following things:

missing header for unified diff at line 3 of patch
(Stripping trailing CRs from patch.)
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|#--- ../A_CLEAN_FILE_SYSTEM/jbd/commit.c 2006-02-25
11:43:19.000000000 -0600
|#+++ commit.c 2006-03-29 20:53:29.000000000 -0600
--------------------------
File to patch:

Can anyone suggest what I am doing wrong while applying this patch or if the
command is correct then why patch is giving the above errors.

Any help can be greatly appreciated.

Thanks,
Yogesh


2006-05-03 12:11:41

by Steven Rostedt

[permalink] [raw]
Subject: Re: Problem while applying patch to 2.6.9 kernel


On Wed, 3 May 2006, Yogesh Pahilwan wrote:

> Hi Kernel Folks,
>
> I am facing some problem while applying patch to the 2.6.9 kernel.
>
> I have done following to apply the patch:
>
> # patch -p1 < ../../Patches/patch-ext3
>
> But getting following things:
>
> missing header for unified diff at line 3 of patch
> (Stripping trailing CRs from patch.)
> can't find file to patch at input line 3
> Perhaps you used the wrong -p or --strip option?

Hmm, perhaps you have the wrong -p option.

> The text leading up to this was:
> --------------------------
> |#--- ../A_CLEAN_FILE_SYSTEM/jbd/commit.c 2006-02-25

Since you didn't show us any of this patch, the above looks like you need
-p2.

You might want to get yourself more familiar with "patch".

-- Steve


> 11:43:19.000000000 -0600
> |#+++ commit.c 2006-03-29 20:53:29.000000000 -0600
> --------------------------
> File to patch:
>
> Can anyone suggest what I am doing wrong while applying this patch or if the
> command is correct then why patch is giving the above errors.
>
> Any help can be greatly appreciated.
>
> Thanks,
> Yogesh
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

2006-05-03 12:30:52

by Yogesh Pahilwan

[permalink] [raw]
Subject: RE: Problem while applying patch to 2.6.9 kernel

Hi Steven,

I tried specifying -p2 as follows:

# patch -p2 < ../../Patches/patch-ext3

But still getting the same error.

Please suggest.

Thanks,
Yogesh

-----Original Message-----
From: Steven Rostedt [mailto:[email protected]]
Sent: Wednesday, May 03, 2006 5:41 PM
To: Yogesh Pahilwan
Cc: [email protected]
Subject: Re: Problem while applying patch to 2.6.9 kernel


On Wed, 3 May 2006, Yogesh Pahilwan wrote:

> Hi Kernel Folks,
>
> I am facing some problem while applying patch to the 2.6.9 kernel.
>
> I have done following to apply the patch:
>
> # patch -p1 < ../../Patches/patch-ext3
>
> But getting following things:
>
> missing header for unified diff at line 3 of patch
> (Stripping trailing CRs from patch.)
> can't find file to patch at input line 3
> Perhaps you used the wrong -p or --strip option?

Hmm, perhaps you have the wrong -p option.

> The text leading up to this was:
> --------------------------
> |#--- ../A_CLEAN_FILE_SYSTEM/jbd/commit.c 2006-02-25

Since you didn't show us any of this patch, the above looks like you need
-p2.

You might want to get yourself more familiar with "patch".

-- Steve


> 11:43:19.000000000 -0600
> |#+++ commit.c 2006-03-29 20:53:29.000000000 -0600
> --------------------------
> File to patch:
>
> Can anyone suggest what I am doing wrong while applying this patch or if
the
> command is correct then why patch is giving the above errors.
>
> Any help can be greatly appreciated.
>
> Thanks,
> Yogesh
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

2006-05-03 12:33:12

by Jesper Juhl

[permalink] [raw]
Subject: Re: Problem while applying patch to 2.6.9 kernel

On 5/3/06, Steven Rostedt <[email protected]> wrote:
>
> On Wed, 3 May 2006, Yogesh Pahilwan wrote:
>
> > Hi Kernel Folks,
> >
> > I am facing some problem while applying patch to the 2.6.9 kernel.
> >
> > I have done following to apply the patch:
> >
> > # patch -p1 < ../../Patches/patch-ext3
> >
> > But getting following things:
> >
> > missing header for unified diff at line 3 of patch
> > (Stripping trailing CRs from patch.)

This sounds like a possibly corrupted patch file.


> > can't find file to patch at input line 3
> > Perhaps you used the wrong -p or --strip option?
>
> Hmm, perhaps you have the wrong -p option.
>
> > The text leading up to this was:
> > --------------------------
> > |#--- ../A_CLEAN_FILE_SYSTEM/jbd/commit.c 2006-02-25
>
> Since you didn't show us any of this patch, the above looks like you need
> -p2.
>
Agreed, wrong -p level looks likely.


> You might want to get yourself more familiar with "patch".
>

There's also Documentation/applying-patches.txt which would be good to
read. Online link here :
http://sosdg.org/~coywolf/lxr/source/Documentation/applying-patches.txt?v=2.6


--
Jesper Juhl <[email protected]>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html

2006-05-03 13:13:20

by Steven Rostedt

[permalink] [raw]
Subject: RE: Problem while applying patch to 2.6.9 kernel


On Wed, 3 May 2006, Yogesh Pahilwan wrote:

> Hi Steven,
>
> I tried specifying -p2 as follows:
>
> # patch -p2 < ../../Patches/patch-ext3
>
> But still getting the same error.
>
> Please suggest.
>

Is this patch proprietary or can you post it? At least can you show the
parts of the patch that have the diff headers (+++ and ---).

-- Steve

2006-05-03 18:01:16

by Bauke Jan Douma

[permalink] [raw]
Subject: Re: Problem while applying patch to 2.6.9 kernel

On Wed, May 03, 2006 at 05:32:02PM +0530, Yogesh Pahilwan wrote:
> I am facing some problem while applying patch to the 2.6.9 kernel.
>
> I have done following to apply the patch:
>
> # patch -p1 < ../../Patches/patch-ext3
>
> But getting following things:
>
> missing header for unified diff at line 3 of patch
> (Stripping trailing CRs from patch.)
> can't find file to patch at input line 3
> Perhaps you used the wrong -p or --strip option?
> The text leading up to this was:
> --------------------------
> |#--- ../A_CLEAN_FILE_SYSTEM/jbd/commit.c 2006-02-25 11:43:19.000000000 -0600
> |#+++ commit.c 2006-03-29 20:53:29.000000000 -0600
> --------------------------
> File to patch:
>
> Can anyone suggest what I am doing wrong while applying this patch or if the
> command is correct then why patch is giving the above errors.

You gotta lose the hash-mark at beginning-of-line of lines 1 and 2
(moise from some cut-n-paste operation?). Then look at the second
line to see how many slashes you gotta skip (with -p -- looks like
it's -p0 here).

bjd

2006-05-04 10:08:03

by Florian Schmidt

[permalink] [raw]
Subject: Re: Problem while applying patch to 2.6.9 kernel

On Wed, 3 May 2006 18:02:45 +0530
"Yogesh Pahilwan" <[email protected]> wrote:

> Hi Steven,
>
> I tried specifying -p2 as follows:
>
> # patch -p2 < ../../Patches/patch-ext3
>
> But still getting the same error.
>
> Please suggest.

I can only suggest using the --dry-run option for patch so you can try
different patchlevels before applying the patch for real.

Flo

--
Palimm Palimm!
http://tapas.affenbande.org