Page MenuHomeFreeBSD

directory(3): Add an ERRORS section

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



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

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

gbe requested review of this revision.Thu, Jul 30, 9:22 AM
gbe created this revision.
bcr accepted this revision as: manpages.Thu, Jul 30, 9:33 AM
bcr added a subscriber: bcr.

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

jilles added a subscriber: jilles.Thu, Jul 30, 7:25 PM
jilles added inline comments.
266 ↗(On Diff #75159)

The error is named slightly differently.

0mp accepted this revision.Fri, Jul 31, 8:55 AM
0mp added a subscriber: 0mp.

Just a couple of minor comments.

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.Fri, Jul 31, 8:55 AM
gbe updated this revision to Diff 75239.Sat, Aug 1, 8:06 AM
  • Correct the error EACCES
This revision now requires review to proceed.Sat, Aug 1, 8:06 AM
gbe marked an inline comment as done.Sat, Aug 1, 8:08 AM
gbe added inline comments.
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.

jilles accepted this revision as: jilles.Sat, Aug 1, 7:58 PM
This revision is now accepted and ready to land.Sat, Aug 1, 7:58 PM
0mp added inline comments.Sun, Aug 2, 3:28 PM
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.