Merged from Lite2. Get the filesystem type name directly from the

statfs struct instead of converting from the filesystem type number.
This commit is contained in:
Bruce Evans 1998-01-20 15:12:24 +00:00
parent 8830deae19
commit 66a655bcf6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=32655

View File

@ -35,9 +35,9 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)mtab_bsd.c 8.1 (Berkeley) 6/6/93
* @(#)mtab_bsd.c 8.2 (Berkeley) 5/10/95
*
* $Id$
* $Id: mtab_bsd.c,v 1.3 1997/02/22 16:02:26 peter Exp $
*
*/
@ -55,12 +55,16 @@ struct statfs *mp;
new_mp->mnt_fsname = strdup(mp->f_mntfromname);
new_mp->mnt_dir = strdup(mp->f_mntonname);
#if BSD >= 199506
ty = mp->f_fstypename;
#else
switch (mp->f_type) {
case MOUNT_UFS: ty = MTAB_TYPE_UFS; break;
case MOUNT_NFS: ty = MTAB_TYPE_NFS; break;
case MOUNT_MFS: ty = MTAB_TYPE_MFS; break;
default: ty = "unknown"; break;
}
#endif
new_mp->mnt_type = strdup(ty);
new_mp->mnt_opts = strdup("unset");
new_mp->mnt_freq = 0;