newfs: warn if newer than kernel
authoremaste <emaste@FreeBSD.org>
Wed, 15 Nov 2017 18:40:40 +0000 (18:40 +0000)
committeremaste <emaste@FreeBSD.org>
Wed, 15 Nov 2017 18:40:40 +0000 (18:40 +0000)
commitfab7d897969438e48e9e84948d2e0e81f9ade410
treecfde3db95551436be686094ec6978f164aa46195
parent0dfd9255c701309d82ab71bdf739c6dd8b47fd3c
newfs: warn if newer than kernel

Creating a UFS filesystem with a newfs newer than the running kernel,
and then mounting that filesystem, can lead to interesting failures.

Add a safety belt to explicitly warn when newfs is newer than the
running kernel.

Reviewed by: gjb, jhb, mckusick
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D12765
sbin/newfs/newfs.c