]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_scrub: synchronize error levels & logging
authorEric Sandeen <sandeen@redhat.com>
Tue, 27 Mar 2018 22:43:37 +0000 (17:43 -0500)
committerEric Sandeen <sandeen@redhat.com>
Tue, 27 Mar 2018 22:43:37 +0000 (17:43 -0500)
commit25992d9c1120ea9097dfb2c08bad2062ded2217d
treea43dd55b3a693b75800831c471789cdacac92672
parent19177e69bbb98bbaf3f64168e77848b7651cf64d
xfs_scrub: synchronize error levels & logging

Having only a subset of the five error_levels present in
the log_level[] array is asking for trouble when someone
tries to __str_log(S_PREEN ...) and overruns the array.

Tie it all together in a single structure that's
initialized together to make the mapping more obvious and
idiot-proof.

Fixes-coverity-id: 1433618
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
scrub/common.c