Re: svn commit: r306031 - head/contrib/netbsd-tests/fs

2016-09-20 Thread Ngie Cooper (yaneurabeya)

> On Sep 20, 2016, at 09:28, Ngie Cooper  wrote:
> 
> Author: ngie
> Date: Tue Sep 20 16:28:57 2016
> New Revision: 306031
> URL: https://svnweb.freebsd.org/changeset/base/306031
> 
> Log:
>  Port contrib/netbsd-tests/fs/h_funcs.subr to FreeBSD
> 
>  Use kldstat -m to determine whether or not a filesystem is loaded. This works
>  well with tmpfs, ufs, and zfs

This also works with msdosfs… (I forgot to check that sooner).
Cheers...


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r306031 - head/contrib/netbsd-tests/fs

2016-09-20 Thread Ngie Cooper
Author: ngie
Date: Tue Sep 20 16:28:57 2016
New Revision: 306031
URL: https://svnweb.freebsd.org/changeset/base/306031

Log:
  Port contrib/netbsd-tests/fs/h_funcs.subr to FreeBSD
  
  Use kldstat -m to determine whether or not a filesystem is loaded. This works
  well with tmpfs, ufs, and zfs
  
  MFC after:1 month
  Sponsored by: Dell EMC Isilon

Modified:
  head/contrib/netbsd-tests/fs/h_funcs.subr

Modified: head/contrib/netbsd-tests/fs/h_funcs.subr
==
--- head/contrib/netbsd-tests/fs/h_funcs.subr   Tue Sep 20 16:27:34 2016
(r306030)
+++ head/contrib/netbsd-tests/fs/h_funcs.subr   Tue Sep 20 16:28:57 2016
(r306031)
@@ -45,6 +45,15 @@ require_fs() {
 
# if we have autoloadable modules, just assume the file system
atf_require_prog sysctl
+   # Begin FreeBSD
+   if true; then
+   if kldstat -m ${name}; then
+   found=yes
+   else
+   found=no
+   fi
+   else
+   # End FreeBSD
autoload=$(sysctl -n kern.module.autoload)
[ "${autoload}" = "1" ] && return 0
 
@@ -57,6 +66,9 @@ require_fs() {
fi
shift
done
+   # Begin FreeBSD
+   fi
+   # End FreeBSD
[ ${found} = yes ] || \
atf_skip "The kernel does not include support the " \
 "\`${name}' file system"
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"