Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc,test: minor improvements to O_DSYNC #15547

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2806,12 +2806,13 @@ The following constants are meant for use with `fs.open()`.
</tr>
<tr>
<td><code>O_SYNC</code></td>
<td>Flag indicating that the file is opened for synchronous I/O.</td>
<td>Flag indicating that the file is opened for synchronized I/O with write
operations waiting for file integrity.</td>
</tr>
<tr>
<td><code>O_DSYNC</code></td>
<td>Flag indicating that the file is opened for synchronous I/O
with write operations waiting for data integrity.</td>
<td>Flag indicating that the file is opened for synchronized I/O with write
operations waiting for data integrity.</td>
</tr>
<tr>
<td><code>O_SYMLINK</code></td>
Expand Down
6 changes: 2 additions & 4 deletions test/parallel/test-fs-open-flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ common.expectsError(
{ code: 'ERR_INVALID_OPT_VALUE', type: TypeError }
);

if (common.isLinux === true) {
if (common.isLinux) {
const file = fixtures.path('a.js');

fs.open(file, O_DSYNC, common.mustCall(function(err, fd) {
assert.ifError(err);
}));
fs.open(file, O_DSYNC, common.mustCall(assert.ifError));
}