This is just a small page to keep track of all the patches I wrote, or use on a regular basis. I've put them here to make sure they don't get lost. All Apple MacBook related patches have their own page.
Since spring 2007 I've been randomly working on FreeBSD ports to make sure they use the POSIX termios interface for terminal line discipline handling. At this moment, there is still a small group of Ports in the tree that make use of the older sgtty interface. When those are converted to termios as well, we can remove the old COMPAT_43TTY kernel option, removing some old cruft from the terminal code.
This patch makes the kernel print a message each time an application calls a deprecated sgtty routine (10 times max). We should probably have something like this to make users aware their application is really antique.
Just like most modern UNIX operating systems, FreeBSD has a lot of utilities and interfaces that are POSIX compliant. For some reason, one utility that is missing is fuser. fuser is a utility that allows you to print PID's of processes that make use of a certain file or filesystem. This patch changes the fstat utility to behave like fuser when called appropriately.
On UNIX-like operating systems, there are three system calls to duplicate file descriptors, each having their own characteristics, namely dup(2), dup2(2) and fcntl(2)'s F_DUPFD command.
All three operations share a common code path. For some reason, the fcntl(2) approach performs a lot of checks that aren't needed, which means more locking will occur. This patch will remove the redundant checks from the source, while remaining compliant with the standards.
The FreeBSD make(1) utility has an optimisation that many implementations have; when a stated command does not contain certain characters, it can start the process itself, instead of handing it over to sh(1) for further processing.
One optimisation has not been taken into account: we can completely ignore a sentence when it starts with a comment character. Because a lot of fancy Makefiles use constructions like these to print comments during compilation, a lot of time is lost spawning useless shells. This patch adds a new attribute to make(1) to perform this check.
On 27 Oct 2007, some code in the lo(4) driver got removed that didn't have any use anymore, namely an internal list of all loopback devices. The author didn't remove all dead code within the driver. This patch removes even more dead code from the driver; it slightly reduces the memory usage of the driver and makes the driver more readable, as it now contains the bare minimum to perform packet looping.
Apple has earned itself a name by shipping keyboards that often return strange scancodes for some buttons. The USB keyboards have F14, F15 and F16 keys where the Pause, Scroll-Lock and Break keys used to be. The MacBooks have an Fn modifier, which allows you to press Home, End, Page-Up and Page-Down when combining it with the arrow keys. This patch adds some quirks for the Apple keyboards I have laying around at home.