Browse Source

doc,test: minor improvements to O_DSYNC

PR-URL: https://github.com/nodejs/node/pull/15547
Refs: https://github.com/nodejs/node/pull/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>
canary-base
Tobias Nießen 8 years ago
parent
commit
f98687db4a
No known key found for this signature in database GPG Key ID: 718207F8FD156B70
  1. 7
      doc/api/fs.md
  2. 6
      test/parallel/test-fs-open-flags.js

7
doc/api/fs.md

@ -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>

6
test/parallel/test-fs-open-flags.js

@ -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));
}

Loading…
Cancel
Save