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>
This commit is contained in:
parent
3a69ef55e0
commit
f98687db4a
@ -2806,12 +2806,13 @@ The following constants are meant for use with `fs.open()`.
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>O_SYNC</code></td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>O_DSYNC</code></td>
|
<td><code>O_DSYNC</code></td>
|
||||||
<td>Flag indicating that the file is opened for synchronous I/O
|
<td>Flag indicating that the file is opened for synchronized I/O with write
|
||||||
with write operations waiting for data integrity.</td>
|
operations waiting for data integrity.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>O_SYMLINK</code></td>
|
<td><code>O_SYMLINK</code></td>
|
||||||
|
@ -81,10 +81,8 @@ common.expectsError(
|
|||||||
{ code: 'ERR_INVALID_OPT_VALUE', type: TypeError }
|
{ code: 'ERR_INVALID_OPT_VALUE', type: TypeError }
|
||||||
);
|
);
|
||||||
|
|
||||||
if (common.isLinux === true) {
|
if (common.isLinux) {
|
||||||
const file = fixtures.path('a.js');
|
const file = fixtures.path('a.js');
|
||||||
|
|
||||||
fs.open(file, O_DSYNC, common.mustCall(function(err, fd) {
|
fs.open(file, O_DSYNC, common.mustCall(assert.ifError));
|
||||||
assert.ifError(err);
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user