Page MenuHomeFreeBSD

Introduce flopenat(3) function.
ClosedPublic

Authored by oshogbo on Jul 21 2017, 6:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Feb 21, 3:37 AM
Unknown Object (File)
Tue, Feb 11, 1:13 AM
Unknown Object (File)
Jan 20 2025, 10:09 AM
Unknown Object (File)
Jan 16 2025, 6:16 PM
Unknown Object (File)
Jan 13 2025, 3:27 AM
Unknown Object (File)
Dec 12 2024, 10:38 PM
Unknown Object (File)
Dec 12 2024, 8:02 PM
Unknown Object (File)
Dec 1 2024, 4:16 PM
Subscribers
None

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

oshogbo retitled this revision from Introcude flopenat(3) function. to Introduce flopenat(3) function..

Sorry guys for spam ;/
Regenerate with -U99999

lib/libutil/flopen.3
32 ↗(On Diff #31069)

only one name per line

lib/libutil/flopen.c
55–57 ↗(On Diff #31069)

these three lines can remain here, they have no bearing on the varargs code

lib/libutil/libutil.h
96 ↗(On Diff #31069)

please follow the leading-underscore convention for argument names

oshogbo marked 2 inline comments as done.

Update after des@ review.

Should the man page document AT_FDCWD?

This LGTM, with @des's approval.

I guess you could copy the sentence about AT_FDCWD from openat(2).

BTW, it just occurred to me that you can avoid the duplicate O_CREAT logic by simply passing ap to flopenatm(), which you can then rename vflopenat() (v for va_list, like vfprintf(), instead of m for mode).

Should the man page document AT_FDCWD?

This LGTM, with @des's approval.

Done.

In D11690#243927, @des wrote:

I guess you could copy the sentence about AT_FDCWD from openat(2).

Done.

In D11690#243927, @des wrote:

BTW, it just occurred to me that you can avoid the duplicate O_CREAT logic by simply passing ap to flopenatm(), which you can then rename vflopenat() (v for va_list, like vfprintf(), instead of m for mode).

Duh ofc... Thanks!!!

Just a few nits before I approve this :)

lib/libutil/flopen.c
126–127 ↗(On Diff #31303)

per style(9), ap goes first.

132 ↗(On Diff #31303)

per style(9), no blank line here.

139–140 ↗(On Diff #31303)

per style(9), ap goes first.

145 ↗(On Diff #31303)

per style(9), no blank line here.

oshogbo marked 4 inline comments as done.

Style fixes.

This revision is now accepted and ready to land.Aug 3 2017, 11:12 AM
This revision was automatically updated to reflect the committed changes.