def _fsck_ext(device):
 msgs = {0: 'No errors', 1: 'Filesystem errors corrected', 2: 'System should be rebooted', 4: 'Filesystem errors left uncorrected', 8: 'Operational error', 16: 'Usage or syntax error', 32: 'Fsck canceled by user request', 128: 'Shared-library error'}
 return msgs.get(__salt__['cmd.run_all']('fsck -f -n {0}'.format(device))['retcode'], 'Unknown error')

def _fsck_ext ( device ) : msgs = { 0 : 'No errors' , 1 : 'Filesystem errors corrected' , 2 : 'System should be rebooted' , 4 : 'Filesystem errors left uncorrected' , 8 : 'Operational error' , 16 : 'Usage or syntax error' , 32 : 'Fsck canceled by user request' , 128 : 'Shared-library error' } return msgs . get ( __salt__ [ 'cmd.run_all' ] ( 'fsck -f -n {0}' . format ( device ) ) [ 'retcode' ] , 'Unknown error' )
check an ext2/ext3/ext4 file system .