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 <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
tniessen committed Oct 3, 2017
1 parent 8b120fe commit 9d97fcc
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 9d97fcc

Please sign in to comment.