72b5c02439
Reduce a number of duplicated logic. As of this commit, this file does exactly what it is needed to do. MFC after: 3 days X-MFC-Note: needs all previous changes Sponsored by: The FreeBSD Foundation