From 611302d61006f21cff5b314426474a52167054aa Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 10 Dec 2014 13:55:53 -0500 Subject: O_DIRECT makes no sense in this test because it requires page/block-sized writes --- tools/sftest.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'tools') diff --git a/tools/sftest.cc b/tools/sftest.cc index 19d0cc5530..772fc3fd43 100644 --- a/tools/sftest.cc +++ b/tools/sftest.cc @@ -5,6 +5,8 @@ #include #include #include +#include + #include #include #include @@ -174,17 +176,10 @@ main (int argc, char* argv[]) path = Glib::build_filename (tmpdirname, ss.str()); int flags = O_RDWR|O_CREAT|O_TRUNC; - -#ifndef __APPLE__ - if (direct) { - flags |= O_DIRECT; - } -#endif - int fd = open (path.c_str(), flags, 0644); if (fd < 0) { - cerr << "Could not open file #" << n << " @ " << path << endl; + cerr << "Could not open file #" << n << " @ " << path << " (" << strerror (errno) << ")" << endl; return 1; } @@ -200,7 +195,7 @@ main (int argc, char* argv[]) } #endif if ((sf = sf_open_fd (fd, SFM_RDWR, &format_info, true)) == 0) { - cerr << "Could not open file #" << n << " @ " << path << endl; + cerr << "Could not open SNDFILE #" << n << " @ " << path << " (" << sf_strerror (0) << ")" << endl; return 1; } -- cgit v1.2.3