Re: [vox-tech] diff/patch question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vox-tech] diff/patch question
- Subject: Re: [vox-tech] diff/patch question
- From: jdnewmil@dcn.dMAPSavis.ca.us
- Date: Thu, 02 Nov 2000 11:33:58 -0800
- References: Pine.LNX.4.21.0011021100520.12898-100000@belial.ucdavis.edu
On Thu, 2 Nov 2000, Peter Jay Salzman wrote:
> i'm trying to patch a file 3dfx_driver.c. the diff i'd like to use looks
> something like:
>
> --- 3dfx_driver.c Sun Jan 9 09:15:29 2000
> +++ 3dfx_driver.c.fix Fri Jul 14 20:56:14 2000
> @@ -703,25 +703,13 @@
> #endif /* HAVE_MTRR */
>
> static struct file_operations fops_3dfx = {
The above part is the pre-context
> - NULL, /* llseek (2.1) / lseek (2.0) */
> - NULL, /* read */
> - NULL, /* write */
this means eliminate these lines
> (etc)
>
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0)
> + owner: THIS_MODULE,
> #endif
> + ioctl: ioctl_3dfx, /* ioctl */
> + mmap: mmap_3dfx, /* mmap */
add these lines
>
> but every time i apply this with patch, i get an error message:
>
> # patch 3dfx_driver.c <diff
> patching file `3dfx_driver.c'
> Hunk #1 FAILED at 703.
> 1 out of 1 hunk FAILED -- saving rejects to 3dfx_driver.c.rej
differences are too major for the pre- and post-context to match up to let
the insertions/deletions take place.
>
> i know there are different diff/patch formats, but i thought they were
> intelligent enough to detect the various versions.
I don't think this is a format problem.
>
> i'm not really familiar with this format anyway -- i'm used to diffs looking
> something like
>
> 2
> < ehlo
> ----
> > hello
>
> or something like that. can someone help me with a suggestion on how to
> apply this patch?
By hand. However, the fact that the files are different enough that the
patch won't take may mean you would be better off finding a newer
original than the one you have.
> i'd do it by hand, but am confused by:
>
> + owner: THIS_MODULE,
> #endif
> + ioctl: ioctl_3dfx, /* ioctl */
>
> i'm not sure what the line without a + would mean.
unchanged text. You should be able to find it in the original file.
> i would think that lines
> beginning with - mean "take it out" and + means "put it in".
this is _supposed_ to be more people-friendly than the old diff format,
but it isn't a miracle in software. :)
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil@dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Work:<JeffN@endecon.com> Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...2k
---------------------------------------------------------------------------
|