From 6955543a8897fd94bf62db1099798f68e323001a Mon Sep 17 00:00:00 2001 From: Mitchell Horne Date: Fri, 2 Oct 2020 00:52:31 +0000 Subject: tmpfs tests: check for built-in tmpfs module As of r363471, tmpfs is included in all GENERIC kernel configs. This results in a warning being emitted for each call to kldload(8): module_register: cannot register tmpfs from tmpfs.ko; already loaded from kernel Check for the presence of the module via kldstat first to quiet this warning. Reviewed by: asomers, arichardson Differential Revision: https://reviews.freebsd.org/D26632 --- contrib/netbsd-tests/fs/h_funcs.subr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/netbsd-tests/fs/h_funcs.subr b/contrib/netbsd-tests/fs/h_funcs.subr index dc4403f4aa18..8da43cc95160 100644 --- a/contrib/netbsd-tests/fs/h_funcs.subr +++ b/contrib/netbsd-tests/fs/h_funcs.subr @@ -45,7 +45,7 @@ require_fs() { # Begin FreeBSD if true; then - if kldload -n ${name}; then + if kldstat -qm ${name} || kldload -n ${name}; then found=yes else found=no -- cgit v1.2.3