Skip to content

Commit

Permalink
doc,test: minor improvements to O_DSYNC
Browse files Browse the repository at this point in the history
Backport-PR-URL: #15653
PR-URL: #15547
Refs: #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 authored and MylesBorins committed Oct 7, 2017
1 parent 8ec81a8 commit dec383a
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 @@ -2867,12 +2867,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 @@ -79,12 +79,10 @@ assert.throws(
/^Error: Unknown file open flag: null$/
);

if (common.isLinux === true) {
if (common.isLinux) {
const file = `${__dirname}/../fixtures/a.js`;

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

function escapeRegExp(string) {
Expand Down

0 comments on commit dec383a

Please sign in to comment.