未验证 提交 514b020b 编写于 作者: O Olatunji Ruwase 提交者: GitHub

Use generic O_DIRECT (#3115)

上级 e73de8ce
......@@ -264,7 +264,7 @@ void report_file_error(const char* filename, const std::string file_op, const in
int open_file(const char* filename, const bool read_op)
{
const int flags = read_op ? (O_RDONLY | __O_DIRECT) : (O_WRONLY | O_CREAT | __O_DIRECT);
const int flags = read_op ? (O_RDONLY | O_DIRECT) : (O_WRONLY | O_CREAT | O_DIRECT);
const int mode = 0600;
const auto fd = open(filename, flags, mode);
if (fd == -1) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册