When compiled with COMPAT_SOLARIS_UFS, always calculate fs_qbmask and

fs_qfmask on the fly. This allows libsa to read newer Solaris ufs
filesystems (which have a slightly incompatible superblock).
Suggested by Antti Kantee when discussing PR kern/37000.
This commit is contained in:
martin 2007-09-29 21:36:56 +00:00
parent c82fd73eb8
commit aa444a36a0
1 changed files with 11 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ufs.c,v 1.49 2006/05/11 01:13:44 mrg Exp $ */
/* $NetBSD: ufs.c,v 1.50 2007/09/29 21:36:56 martin Exp $ */
/*-
* Copyright (c) 1993
@ -855,8 +855,16 @@ ffs_oldfscompat(struct fs *fs)
{
#ifdef COMPAT_UFS
if (fs->fs_magic == FS_UFS1_MAGIC &&
fs->fs_old_inodefmt < FS_44INODEFMT) {
/*
* Newer Solaris versions have a slightly incompatible
* superblock - so always calculate this values on the fly, which
* is good enough for libsa purposes
*/
if (fs->fs_magic == FS_UFS1_MAGIC
#ifndef COMPAT_SOLARIS_UFS
&& fs->fs_old_inodefmt < FS_44INODEFMT
#endif
) {
fs->fs_qbmask = ~fs->fs_bmask;
fs->fs_qfmask = ~fs->fs_fmask;
}