From 9d97fcc727ddc4bc126aa4d22e4c41e3a51c2b05 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 fc511bf7fe5585..ec99f3dd7df4a6 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2867,12 +2867,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 e4bc8610998eb6..d2be078812f351 100644 --- a/test/parallel/test-fs-open-flags.js +++ b/test/parallel/test-fs-open-flags.js @@ -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) {