From 7063f254c6a352b5ecaf291e58a5f51298a58789 Mon Sep 17 00:00:00 2001 From: Jonas Hermsmeier Date: Fri, 16 Feb 2018 18:00:10 +0100 Subject: [PATCH] fix(cli): Remove O_DIRECT & O_EXCL This removes O_DIRECT and O_EXCL flags from the writer, as O_DIRECT can lead to EINVAL under quite a few circumstances, and O_EXCL has proven to be useless. Change-Type: patch --- lib/cli/writer.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/cli/writer.js b/lib/cli/writer.js index 22e63ea9..4e7ff311 100644 --- a/lib/cli/writer.js +++ b/lib/cli/writer.js @@ -88,10 +88,8 @@ exports.writeImage = (imagePath, drive, options, onProgress) => { }).then(() => { /* eslint-disable no-bitwise */ const flags = fs.constants.O_RDWR | - fs.constants.O_EXCL | fs.constants.O_NONBLOCK | - fs.constants.O_SYNC | - fs.constants.O_DIRECT + fs.constants.O_SYNC /* eslint-enable no-bitwise */ return fs.openAsync(driveObject.raw, flags)