Skip to content

Commit 2705af3

Browse files
committed
misc/bugfixes: fix forgotten check for uring version and parsing linux version with + in it
1 parent 6479fe3 commit 2705af3

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/ichor/event_queues/IOUringQueue.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ namespace Ichor {
340340
};
341341

342342
IOUringQueue::IOUringQueue(uint64_t quitTimeoutMs, long long pollTimeoutNs, tl::optional<v1::Version> emulateKernelVersion) : _quitTimeoutMs(quitTimeoutMs), _pollTimeoutNs(pollTimeoutNs) {
343-
if(io_uring_major_version() != 2 || io_uring_minor_version() != 10) {
344-
fmt::println("io_uring version is {}.{}, but expected 2.10. Ichor is not compiled correctly.", io_uring_major_version(), io_uring_minor_version());
343+
if(io_uring_major_version() != 2 || io_uring_minor_version() != 12) {
344+
fmt::println("io_uring version is {}.{}, but expected 2.12. Ichor is not compiled correctly.", io_uring_major_version(), io_uring_minor_version());
345345
std::terminate();
346346
}
347347
_threadId = std::this_thread::get_id(); // re-set in functions below, because adding events when the queue isn't running yet cannot be done from another thread.

src/ichor/stl/LinuxUtils.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ tl::optional<Ichor::v1::Version> Ichor::v1::kernelVersion() {
1414
if(auto pos = release.find('-'); pos != std::string_view::npos) {
1515
release = release.substr(0, pos);
1616
}
17+
if(auto pos = release.find('+'); pos != std::string_view::npos) {
18+
release = release.substr(0, pos);
19+
}
1720

1821
auto version = parseStringAsVersion(release);
1922

0 commit comments

Comments
 (0)