Skip to content

Commit fda37f2

Browse files
authored
Fix the homeblocks API which now uses std::expected (#120)
1 parent a33b45e commit fda37f2

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

.github/workflows/build_dependencies.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,5 @@ jobs:
158158
uses: codecov/codecov-action@v5
159159
with:
160160
files: ./coverage.xml
161+
disable_search: true
161162
if: ${{ inputs.testing == 'True' && inputs.tooling == 'Coverage' }}

conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class UBlkPPConan(ConanFile):
1212
name = "ublkpp"
13-
version = "0.15.1"
13+
version = "0.15.2"
1414

1515
homepage = "https://github.com/szmyd/ublkpp"
1616
description = "A UBlk library for CPP application"

example/ublkpp_disk.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static auto create_hb_volume(UblkPPApplication& app, boost::uuids::uuid const& v
143143
->create_volume(std::move(vol_info))
144144
.via(&folly::InlineExecutor::instance())
145145
.thenValue([](auto&& e) {
146-
if (e.hasError()) { return std::make_error_condition(std::errc::io_error); }
146+
if (!e.has_value()) { return std::make_error_condition(std::errc::io_error); }
147147
return std::error_condition();
148148
})
149149
.get();

gcovr.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
high-threshold = 80
22
medium-threshold = 65
33

4+
exclude-unreachable-branches = yes
5+
46
exclude = .*build.*
57
exclude = .*flip.*
68
exclude = .*generate.*

src/driver/homeblk_disk.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ io_result HomeBlkDisk::async_iov(ublksrv_queue const* q, ublk_io_data const* dat
9090
{
9191
auto lck = std::scoped_lock< std::mutex >(pending_results_lck);
9292
pending_results.emplace_back(async_result{
93-
data, sub_cmd, (e.hasError() ? -EIO : (int)nr_lbas << params()->basic.logical_bs_shift)});
93+
data, sub_cmd, (!e.has_value() ? -EIO : (int)nr_lbas << params()->basic.logical_bs_shift)});
9494
}
9595
ublksrv_queue_send_event(q);
9696
new_request.reset();

0 commit comments

Comments
 (0)