dfa: use more meaningful return codes