From 9b7f47647023d73b58fae2605551bf72a884be75 Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Fri, 22 Dec 2023 00:28:37 +0100 Subject: [PATCH] pyocf: Update after removing struct ocf_io Signed-off-by: Robert Baldyga Signed-off-by: Michal Mielewczyk --- tests/functional/pyocf/c/wrappers/ocf_io_wrappers.c | 13 +++++++------ tests/functional/pyocf/types/io.py | 8 ++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/tests/functional/pyocf/c/wrappers/ocf_io_wrappers.c b/tests/functional/pyocf/c/wrappers/ocf_io_wrappers.c index 87e095d..2cdb9ab 100644 --- a/tests/functional/pyocf/c/wrappers/ocf_io_wrappers.c +++ b/tests/functional/pyocf/c/wrappers/ocf_io_wrappers.c @@ -1,39 +1,40 @@ /* * Copyright(c) 2012-2022 Intel Corporation + * Copyright(c) 2024 Huawei Technologies * SPDX-License-Identifier: BSD-3-Clause */ #include "ocf/ocf_io.h" #include "ocf/ocf_core.h" -void ocf_io_set_cmpl_wrapper(struct ocf_io *io, void *context, +void ocf_io_set_cmpl_wrapper(ocf_io_t io, void *context, void *context2, ocf_end_io_t fn) { ocf_io_set_cmpl(io, context, context2, fn); } -void ocf_io_set_start_wrapper(struct ocf_io *io, ocf_start_io_t fn) +void ocf_io_set_start_wrapper(ocf_io_t io, ocf_start_io_t fn) { ocf_io_set_start(io, fn); } -void ocf_io_set_handle_wrapper(struct ocf_io *io, ocf_handle_io_t fn) +void ocf_io_set_handle_wrapper(ocf_io_t io, ocf_handle_io_t fn) { ocf_io_set_handle(io, fn); } -void ocf_core_submit_io_wrapper(struct ocf_io *io) +void ocf_core_submit_io_wrapper(ocf_io_t io) { ocf_core_submit_io(io); } -void ocf_core_submit_flush_wrapper(struct ocf_io *io) +void ocf_core_submit_flush_wrapper(ocf_io_t io) { ocf_core_submit_flush(io); } -void ocf_core_submit_discard_wrapper(struct ocf_io *io) +void ocf_core_submit_discard_wrapper(ocf_io_t io) { ocf_core_submit_discard(io); } diff --git a/tests/functional/pyocf/types/io.py b/tests/functional/pyocf/types/io.py index 4ae469a..92dff06 100644 --- a/tests/functional/pyocf/types/io.py +++ b/tests/functional/pyocf/types/io.py @@ -39,7 +39,7 @@ class IoOps(Structure): class Io(Structure): START = CFUNCTYPE(None, c_void_p) HANDLE = CFUNCTYPE(None, c_void_p, c_void_p) - END = CFUNCTYPE(None, c_void_p, c_int) + END = CFUNCTYPE(None, c_void_p, c_void_p, c_void_p, c_int) _instances_ = {} _fields_ = [ @@ -86,8 +86,8 @@ class Io(Structure): @staticmethod @END - def c_end(io, err): - Io.get_instance(io).end(err) + def c_end(io, priv1, priv2, err): + Io.get_instance(io).end(priv1, priv2, err) @staticmethod @START @@ -99,7 +99,7 @@ class Io(Structure): def c_handle(io, opaque): Io.get_instance(io).handle(opaque) - def end(self, err): + def end(self, priv1, priv2, err): try: self.callback(err) except: # noqa E722