replace 'result' with 'errno' field.