Page MenuHomeFreeBSD

Introduce flopenat(3) function.
ClosedPublic

Authored by oshogbo on Jul 21 2017, 6:14 PM.
Tags
None
Referenced Files
F136982062: D11690.id31579.diff
Thu, Nov 20, 9:59 PM
F136979764: D11690.id31069.diff
Thu, Nov 20, 9:49 PM
F136979733: D11690.id31323.diff
Thu, Nov 20, 9:49 PM
F136979554: D11690.id31064.diff
Thu, Nov 20, 9:49 PM
F136979293: D11690.id31066.diff
Thu, Nov 20, 9:48 PM
F136979189: D11690.id31303.diff
Thu, Nov 20, 9:47 PM
F136979117: D11690.id.diff
Thu, Nov 20, 9:47 PM
F136979015: D11690.id31198.diff
Thu, Nov 20, 9:46 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.