From f98687db4a95450965a503c63982657a61fd49b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Fri, 22 Sep 2017 03:10:04 +0200 Subject: [PATCH] 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 Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater --- doc/api/fs.md | 7 ++++--- test/parallel/test-fs-open-flags.js | 6 ++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index ce29e334853..76c1061dd8b 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2806,12 +2806,13 @@ The following constants are meant for use with `fs.open()`. O_SYNC - Flag indicating that the file is opened for synchronous I/O. + Flag indicating that the file is opened for synchronized I/O with write + operations waiting for file integrity. O_DSYNC - Flag indicating that the file is opened for synchronous I/O - with write operations waiting for data integrity. + Flag indicating that the file is opened for synchronized I/O with write + operations waiting for data integrity. O_SYMLINK diff --git a/test/parallel/test-fs-open-flags.js b/test/parallel/test-fs-open-flags.js index f480ede4e36..c73dbb5c6ed 100644 --- a/test/parallel/test-fs-open-flags.js +++ b/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)); }