Skip to content

Commit

Permalink
doc,test: minor improvements to O_DSYNC
Browse files Browse the repository at this point in the history
PR-URL: nodejs#15547
Refs: nodejs#15451
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
tniessen committed Sep 26, 2017
1 parent 3a69ef5 commit f98687d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
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));
}

0 comments on commit f98687d

Please sign in to comment.