// SPDX-License-Identifier: GPL-2.0-only /* * Copyright 2023 Red Hat */ #include "status-codes.h" #include "errors.h" #include "logger.h" #include "permassert.h" #include "thread-utils.h" const struct error_info vdo_status_list[] = …; /** * vdo_register_status_codes() - Register the VDO status codes. * Return: A success or error code. */ int vdo_register_status_codes(void) { … } /** * vdo_status_to_errno() - Given an error code, return a value we can return to the OS. * @error: The error code to convert. * * The input error code may be a system-generated value (such as -EIO), an errno macro used in our * code (such as EIO), or a UDS or VDO status code; the result must be something the rest of the OS * can consume (negative errno values such as -EIO, in the case of the kernel). * * Return: A system error code value. */ int vdo_status_to_errno(int error) { … }