Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Nov 2007 10:03:22 +0000
From:      Alex Zbyslaw <xfb52@dial.pipex.com>
To:        Chuck Robey <chuckr@chuckr.org>
Cc:        User Questions <freebsd-questions@freebsd.org>
Subject:   Re: how to compile and install a new driver
Message-ID:  <474D3CEA.2020505@dial.pipex.com>
In-Reply-To: <474CA85D.6080501@chuckr.org>
References:  <539c60b90711271248o6eb0b9fw757e40fbcdfdb3c2@mail.gmail.com>	<20071127151259.H27150@wonkity.com> <474CA85D.6080501@chuckr.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Chuck Robey wrote:

> Nice description, but you'd better include enough info so that they 
> could make FreeBSD-stype diffs: diff has the unfortunate default of 
> making an output that is compatible with ed(1).  This supplies 
> extremely little information to use, in case the file you're trying to 
> patch with that diff has changed, and is also damned hard for mere 
> humans to understand.   There are two other options you can give to 
> diff that change the format: -c gives "context" diffs, and -u gives 
> "unified" diffs, and the -u is the option that is standard with FreeBSD.

It's not FreeBSD's default, it's POSIX's and has been the default 
behaviour of diff since forever (i.e. before -c or -u had even been 
invented); it is also the default behaviour of diff on every version of 
Linux I've ever used as well and probably every unix-like box you can 
get your hands on.  Backwards compatibility *is* a wonderful thing.

-u is a newbie to the diff world of options and is the strongly 
*preferred* way of providing patches, and probably not just for 
FreeBSD.  It's generally the easiest for humans to read and the best for 
general use, though -c isn't that hard either and can sometimes be 
easier to comprehend.

--Alex




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?474D3CEA.2020505>