From 87ea32d0c6c8bfd691fb4564d538000b6bf292ca Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Fri, 15 Nov 2024 13:26:27 -0500 Subject: [PATCH] xrt: introduce XRT_ERROR_OUTPUT_REQUEST_FAILURE Part-of: --- doc/changes/xrt/mr.2360.md | 1 + src/xrt/auxiliary/util/u_pretty_print.c | 1 + src/xrt/include/xrt/xrt_results.h | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/doc/changes/xrt/mr.2360.md b/doc/changes/xrt/mr.2360.md index 63840a926..005d06fca 100644 --- a/doc/changes/xrt/mr.2360.md +++ b/doc/changes/xrt/mr.2360.md @@ -1,2 +1,3 @@ - xrt_device_set_output returns xrt_result_t to improve error handling in the state tracker - introduce XRT_ERROR_OUTPUT_UNSUPPORTED +- introduce XRT_ERROR_OUTPUT_REQUEST_FAILURE diff --git a/src/xrt/auxiliary/util/u_pretty_print.c b/src/xrt/auxiliary/util/u_pretty_print.c index 839d99576..3beba3141 100644 --- a/src/xrt/auxiliary/util/u_pretty_print.c +++ b/src/xrt/auxiliary/util/u_pretty_print.c @@ -174,6 +174,7 @@ u_pp_xrt_result(struct u_pp_delegate dg, xrt_result_t xret) case XRT_ERROR_FEATURE_NOT_SUPPORTED: DG("XRT_ERROR_FEATURE_NOT_SUPPORTED"); return; case XRT_ERROR_INPUT_UNSUPPORTED: DG("XRT_ERROR_INPUT_UNSUPPORTED"); return; case XRT_ERROR_OUTPUT_UNSUPPORTED: DG("XRT_ERROR_OUTPUT_UNSUPPORTED"); return; + case XRT_ERROR_OUTPUT_REQUEST_FAILURE: DG("XRT_ERROR_OUTPUT_REQUEST_FAILURE"); return; } // clang-format on diff --git a/src/xrt/include/xrt/xrt_results.h b/src/xrt/include/xrt/xrt_results.h index 4524d1ec5..a8804868e 100644 --- a/src/xrt/include/xrt/xrt_results.h +++ b/src/xrt/include/xrt/xrt_results.h @@ -209,4 +209,9 @@ typedef enum xrt_result * The output provided is a valid value from the enum xrt_output_name but is not supported by the driver. */ XRT_ERROR_OUTPUT_UNSUPPORTED = -34, + + /*! + * The requested operation failed, verify the log to know more. + */ + XRT_ERROR_OUTPUT_REQUEST_FAILURE = -35, } xrt_result_t; -- 2.51.2