NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/59563: Use of FS_UFS2_MAGIC is problematic



Does not matter, because:

        /* Allow converting from UFS2 to UFS2EA but not vice versa. */
        if (newfs->fs_magic == FS_UFS2EA_MAGIC) {
                ump->um_flags |= UFS_EA;
                newfs->fs_magic = FS_UFS2_MAGIC;
        } else {
                if ((ump->um_flags & UFS_EA) != 0)
                        return EINVAL;
        }

If that was not the case we would get corruption and crashes. But I agree with you, it is better to do the test one way and perhaps put it in a macro.

christos

Attachment: signature.asc
Description: Message signed with OpenPGP



Home | Main Index | Thread Index | Old Index