Whamcloud - gitweb
libext2fs: report bad magic over bad sb checksum
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 8 Sep 2014 23:11:49 +0000 (16:11 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 11 Sep 2014 16:40:54 +0000 (12:40 -0400)
commitf92c600c09bbda482c6c4a37602db4f0db864a9e
tree8dc0235333e19cb870f9182a300e46d60604b0dc
parent38d5adf33993264d8db78ebb3d924e9d9e155590
libext2fs: report bad magic over bad sb checksum

We don't want ext2fs_open2() to report bad sb checksum on something
that's not even an ext* superblock.  This apparently happens pretty
easily if we try to open an XFS filesystem.  Thus, make it so that a
bad magic number code always trumps the sb checksum error code.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/openfs.c