Page MenuHomeFreeBSD

directory(3): Add an ERRORS section
ClosedPublic

Authored by gbe on Jul 30 2020, 9:22 AM.

Details

Summary

directory(3): Add an ERRORS section

  • Add an ERRORS section for opendir(3)
  • Document readdir(), readdir_r(), telldir() and closedir()
  • Convert the code sample into an EXAMPLES section

PR: 75711
Obtained from: partial from OpenBSD

Test Plan

mandoc output review and 'mandoc -Tlint' checks

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

gbe requested review of this revision.Jul 30 2020, 9:22 AM
gbe created this revision.
bcr added a subscriber: bcr.

Looks good to me. Thanks for the update, Gordon.

jilles added inline comments.
lib/libc/gen/directory.3
266 ↗(On Diff #75159)

The error is named slightly differently.

0mp added a subscriber: 0mp.

Just a couple of minor comments.

lib/libc/gen/directory.3
265 ↗(On Diff #75159)

"Er" does not expand to anything interesting as an argument to -width, so it would be better to either change it to something more idiomatic like 2n if you need two spaces of width.

298 ↗(On Diff #75159)

Same as above :)

This revision is now accepted and ready to land.Jul 31 2020, 8:55 AM
  • Correct the error EACCES
This revision now requires review to proceed.Aug 1 2020, 8:06 AM
gbe marked an inline comment as done.Aug 1 2020, 8:08 AM
gbe added inline comments.
lib/libc/gen/directory.3
265 ↗(On Diff #75159)

I had a quick look in a few other man pages and the "-width Er" seems to be standard for error section. I would leave it that way.

266 ↗(On Diff #75159)

Thanks, I have corrected it.

This revision is now accepted and ready to land.Aug 1 2020, 7:58 PM
lib/libc/gen/directory.3
265 ↗(On Diff #75159)

Alright, thanks for checking :)

This revision was automatically updated to reflect the committed changes.
gbe marked an inline comment as done.