Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Nov 2001 21:19:01 -0600
From:      Mike Meyer <mwm@mired.org>
To:        "Anthony Atkielski" <anthony@freebie.atkielski.com>
Cc:        questions@freebsd.org
Subject:   Re: Changing source code and rebuilding kernel -- how do I maintain my changes?
Message-ID:  <15357.49189.674941.587953@guru.mired.org>
In-Reply-To: <70360612@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
Anthony Atkielski <anthony@freebie.atkielski.com> types:
> In order to remove a diagnostic message, I need to change one line of if_xlreg.h
> in the source code.  What is the proper procedure for changing the file and
> maintaining the change should the source code be updated?  For the moment, I
> just copied the original source to if_xlreg.h.old in the same directory, then
> made my change, with a comment that I can grep if I need to find it in future.
> Is this a good way to do it?  What happens when I refresh all the source with
> more recent versions?

Erik provided the conventional way to do things. Another is to keep
create a patch file like so:

	diff -u if_xlreg.h.old if_xlreg.h > ~/if_xlreg.patch

Then apply the patch after you cvsup:

	patch < ~/if_xlreg.patch

This will move if_xlreg.h to if_xlreg.h.orig, and you should then
recreate the patch file, as allow changes to accumulate can cause the
patch to fail.

Assuming the diagnostic is wrong for your hardware, you might consider
PR'ing a patch that checks the hardware type and only issues the
diagnostic if it's correct. If the diagnostic is correct, you might
consider fixing the problem.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Q: How do you make the gods laugh?		A: Tell them your plans.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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