HomeFreeBSD

Use SET_ERROR for constant non-zero return codes

Description

Use SET_ERROR for constant non-zero return codes

Update many return and assignment statements to follow the convention
of using the SET_ERROR macro when returning a hard-coded non-zero
value from a function. This aids debugging by recording the error
codes in the debug log.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Ned Bass <bass6@llnl.gov>
Closes #6441

Details

Provenance
Ned Bass <bass6@llnl.gov>Authored on Aug 3 2017, 4:16 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Aug 3 2017, 4:16 AM
Parents
rG6710381680b0: Only record zio->io_delay on reads and writes
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGecb2b7dc7f8f: Use SET_ERROR for constant non-zero return codes (authored by Ned Bass <bass6@llnl.gov>).Aug 3 2017, 4:16 AM