Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2017-12-05 12:33:19 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2017-12-05 12:33:19 +0300
commit9e4a571b9ecba80d93ede7cb18bf12f4e9a425f3 (patch)
treeb1350c0f35d465559b2a20c859fca9a592d67727 /programs
parentfe0ced566f33ff936257f3a3f54c84c43f905144 (diff)
Fix map_handle_create_close regression failure. Fix build breakage in programs from recent API changes.
Diffstat (limited to 'programs')
-rw-r--r--programs/benchmark-locking/main.cpp4
-rw-r--r--programs/key-value-store/main.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/programs/benchmark-locking/main.cpp b/programs/benchmark-locking/main.cpp
index c5ebd9ae..16d7bbb9 100644
--- a/programs/benchmark-locking/main.cpp
+++ b/programs/benchmark-locking/main.cpp
@@ -70,9 +70,9 @@ static volatile size_t *shared_memory;
static void initialise_shared_memory()
{
auto fh = afio::file_handle::file({}, "shared_memory", afio::file_handle::mode::write, afio::file_handle::creation::if_needed, afio::file_handle::caching::temporary).value();
- auto sh = afio::section_handle::section(8, fh, afio::section_handle::flag::write).value();
+ auto sh = afio::section_handle::section(fh, 8, afio::section_handle::flag::write).value();
auto mp = afio::map_handle::map(sh).value();
- shared_memory = (size_t *)mp.address();
+ shared_memory = (size_t *) mp.address();
if(!shared_memory)
abort();
*shared_memory = (size_t) -1;
diff --git a/programs/key-value-store/main.cpp b/programs/key-value-store/main.cpp
index 6f388bb1..101fa8b8 100644
--- a/programs/key-value-store/main.cpp
+++ b/programs/key-value-store/main.cpp
@@ -45,7 +45,7 @@ namespace stackoverflow
if(!_fh)
{
// Fetch the error code
- std::error_code ec = _fh.error();
+ std::error_code ec = _fh.error().ec;
// Did we fail due to file not found?
// It is *very* important to note that ec contains the *original* error code which could
// be POSIX, or Win32 or NT kernel error code domains. However we can always compare,
@@ -69,7 +69,7 @@ namespace stackoverflow
file_handle::io_result<file_handle::buffers_type> _buffers_read = read(fh, {reqs, 0});
if(!_buffers_read)
{
- std::error_code ec = _fh.error();
+ std::error_code ec = _fh.error().ec;
std::cerr << "Reading the file " << path << " failed with " << ec.message() << std::endl;
}
// Same as before, either throw any error or unpack the value returned