Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
tniessen authored and MylesBorins committed Oct 7, 2017
1 parent 8ec81a8 commit dec383a
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
@@ -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>
6 changes: 2 additions & 4 deletions test/parallel/test-fs-open-flags.js
Original file line number Diff line number Diff line change
@@ -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) {

0 comments on commit dec383a

Please sign in to comment.