Re: 3c59x driver

Andrew E. Mileski (aem@nic.ott.hookup.net)
Tue, 10 Dec 1996 14:02:49 -0500 (EST)


> Here is a diff -u of the changes I made on the 3c59x driver
> Sorry about just using diff last time.

While we are on the subject of problems with making patches...

The syntax Linus uses is:
diff -u --recursive --new-file linux-2.1.14 linux > my_patch
Though you don't have to do the entire directory tree, you should
still base the diff from the same directory so the paths are the same.
diff -u --recursive --new-file linux-2.1.14/drivers/net/3c59x.c \
linux/drivers/net/3c59x-new.c > patch
Personally, I like to have this in a script (lazy typist).

I _HIGHLY_ recommend that if at all possible when making a patch,
the _original_ (virgin) code be in a directory with version info
in the name.

So this...
> --- tmp/network-drivers/3c59x.c Fri Nov 22 17:05:39 1996
> +++ linux/drivers/net/3c59x-new.c Mon Dec 9 17:39:42 1996

would be....
--- linux-2.1.14/drivers/net/3c59x.c Fri Nov 22 17:05:39 1996
+++ linux/drivers/net/3c59x-new.c Mon Dec 9 17:39:42 1996

Notice above how diff nicely indicates the path in the '---' lines.
Now foerver-and-ever, people will know what the heck VERSION you are
applying the patch too :-)

It doesn't hurt mentioning it in your post either <hint, hint>

--
Andrew E. Mileski   mailto:aem@ott.hookup.net
Linux Plug-and-Play Kernel Project http://www.redhat.com/linux-info/pnp/
XFree86 Matrox Team http://www.bf.rmit.edu.au/~ajv/xf86-matrox.html