diff options
| author | martin <martin@NetBSD.org> | 2007-09-29 21:36:56 +0000 |
|---|---|---|
| committer | martin <martin@NetBSD.org> | 2007-09-29 21:36:56 +0000 |
| commit | aa444a36a00cd1320c5f7dfe0d3eee331b80e593 (patch) | |
| tree | 3f000cb50f69acf18a129707154a61e8f574cee3 /sys/lib | |
| parent | c82fd73eb87688f88ac96077e0bf250593d0ec46 (diff) | |
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.
Diffstat (limited to 'sys/lib')
| -rw-r--r-- | sys/lib/libsa/ufs.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/lib/libsa/ufs.c b/sys/lib/libsa/ufs.c index ba7fd9211da..cfaa3549d25 100644 --- a/sys/lib/libsa/ufs.c +++ b/sys/lib/libsa/ufs.c @@ -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; } |
