[wplug-bsd] Patching a driver

Brian A. Seklecki lavalamp at spiritual-machines.org
Tue Oct 17 10:27:52 EDT 2006


Just submit the patch against -currrent (-rHEAD) to the driver
maintainer.

Open A PR to track the issue.

Send it to the current-users mailing list as well asking for tester.

If the maintainer likes it, he'll commit it.  After a few weeks, it'll
get MFC/RPF'd into stable.  If you make the cut in time, it'll make it
into 6.2.  

If it's *critical*, it'll get backported into all currently
maintained/supported patch branches to which are effected

See me in person for a better explanation of the 3-t system

~BAS

On Tue, 2006-10-17 at 10:08, Poyner, Brandon wrote:
> I can only answer the basics as it's been a while.  The first thing to
> do is look for an existing FreeBSD bug report and then see if anybody's
> reported and fixed it in OpenBSD or NetBSD.  You really want an official
> fix for this in cvs, right?  Here is a FreeBSD bug report, it's light on
> details.  Can you assist in confirming that ip->i_nlink really doesn't
> return the right value?
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=86965&cat=
> 
> I'm not sure what the "BSD way" of tracking your own patches would be.
> You could certainly create your own CVS and check in your one change but
> that's massive overkill.  If you don't cvsup all that often you might
> use rcs to track your changes.  It's really best to get the official
> fix.
> 
> You could try making the change to the source, compiling the kernel and
> modules, stop samba and anything else using ntfs, kldunload ntfs, then
> kldload the ntfs module you just built, and restart samba.
> 
> Brandon Poyner
> Network Engineer III
> CCAC - College Office
> 412-237-3086
>  
> 
> > -----Original Message-----
> > From: wplug-bsd-bounces+bpoyner=ccac.edu at wplug.org 
> > [mailto:wplug-bsd-bounces+bpoyner=ccac.edu at wplug.org] On 
> > Behalf Of Brandon Kuczenski
> > Sent: Monday, October 16, 2006 6:48 PM
> > To: WPLUG BSD user group
> > Subject: [wplug-bsd] Patching a driver
> > 
> > I'm working with samba at work and came across the following bug:
> > 
> > https://bugzilla.samba.org/show_bug.cgi?id=2794
> > 
> > in a somewhat unpleasant way.  It seems the samba people think that 
> > FreeBSD's ntfs driver is broken, and misreports the number of 
> > hard links 
> > for files on ntfs filesystems.
> > 
> > It looks like there is a simple one-line hack of a patch, to 
> > sys/fs/ntfs/ntfs_vnops.c, which is explained in the comments 
> > to the bug:
> > 
> >   before:
> >  	vap->va_nlink = ip->i_nlink;
> >   after:
> >  	vap->va_nlink = (ip->i_nlink ? ip->i_nlink : 1);
> > 
> > My question: what is the 'BSD' way to implement this patch 
> > and install the 
> > patched driver, if possible without rebuilding the kernel?
> > 
> > Thanks,
> > Brandon
> > 
> > _______________________________________________
> > wplug-bsd mailing list
> > wplug-bsd at wplug.org
> > http://www.wplug.org/mailman/listinfo/wplug-bsd
> > 
> 
> _______________________________________________
> wplug-bsd mailing list
> wplug-bsd at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug-bsd



More information about the wplug-bsd mailing list