r22471: Convert more code to use proper LDB error codes.